I would like to install spyder (the math IDE for python, here 2.7) on my windows 8.1 machine.
I did install python starting from http://www.python.org/download/releases/2.7.6/;
I did install pip after having installed setuptools, following http://www.pip-installer.org/en/latest/installing.html for these installations;
I did change my path to add C:\Python27 and C:\Python27\Scripts to it, digging into the advanced parameters of my PC's properties. (By the way, I can't beleive the way you do this on windows has not changed for ages, with such a small input where you forgot to go at the end of the value when adding your path...)
I did install spyder
pip install spyder
But when launching it in command line (it's in the path :-) ), I ran through this error:
RuntimeError: Please check Spyder installation requirements:
PyQt4 4.4+ (or PySide 1.1.1+) is required.
Which is truly true. Though,
when trying to pip PyQt4 :
No distributions at all found for PyQt4
when trying to pip PySide, I have many errors, the root one seeming that it is unable to find nmake
Any piece of advice ?
To install PySide on Windows you can choose from the following options:
Download and install the packages from the releases page.
Use setuptools to install the egg binary packages:
c:> c:\Python27\Scripts\easy_install PySide
Use pip to install the wheel binary packages:
c:> c:\Python27\Scripts\pip install --use-wheel PySide
Details are here https://pypi.python.org/pypi/PySide#installing-pyside-on-a-windows-system
BTW: PyQt does not support setuptools or pip
I am not sure if its a proper answer, but you might want to take a look at PythonXY. It makes all these installation procedure a breeze.
From the details in your question, it looks like you are missing both PyQt4 and Qt itself.
There are binary installers for Windows available from the PyQt download page. These installers include both PyQt and Qt (as well as various other tools such as Qt Designer). The only things not included are the Qt documentation, and Python itself (which you seem to have already installed).
Just be careful to select the right installer from the list of Binary Packages: i.e. the one for Python-2.7, plus whatever architecture is appropriate for your system.
Related
I try to install pyqt5-tools like this:
pip install pyqt5-tools
and the resulting out put is:
ERROR: Could not find a version that satisfies the requirement pyqt5-tools (from versions: none)
ERROR: No matching distribution found for pyqt5-tools
I need to download pyqt5-tools because I am trying to learn how to make GUIs with PyQt (I am a beginner programmer).
I have tried downloading different packages but anything related to PyQt has failed... It happens on both my Mac and Ubuntu machine.
I have checked that the packages are available on PyPI and literally copy-pasted the install command from the website into the terminal to make sure that I did not do it wrong.
Assuming you are installing that for qtdesigner. You can install it by package manager. I've installed it on my Debian machine
sudo apt install pyqt5-dev-tools pyqt5-dev
And you can find QtDesigner in
/usr/lib/x86_64-linux-gnu/qt5/bin/designer
If you are on windows use pip install PyQt5Designer instead.
You can download pyside2 it includes almost everything in pyqt5-tools; pyqt5, pyuic5 and the qdesigner
pip install PySide2
pyqt5-tools is only available for Windows as seen on their site: https://pypi.org/project/pyqt5-tools/
Try an alternative such as QT-creator for Mac: https://www.qt.io/download
This post strongly supports using Homebrew: Python PyQt on macOS Sierra
At first, if you are using python v3.10, probably, it won't work well.
when I have this error I uninstall python.
then install the python v3.9. it works better as it is older than v3.10
Best Solution I found
If you try to download pyqt5-tools it's not going to work with python v.3.10.x. But if you want to download it correctly you should try this solution because it works for me.
Install PyQt5:
pip install pyqt5
Install PyQt5Designer:
pip install PyQt5Designer
Then you should Find the Qt Designer, under the name designer.exe:
C:\...\Python\Python310\Lib\site-packages\QtDesigner\designer.exe
Note that the installation path of python may be different for you, to find yours, try this on your Python interpreter, type the following commands:
>>> import os, sys
>>> os.path.dirname(sys.executable)
'C:\\path-to-your-python-installation\\Python\\Python310'
Then you should find the QtDesigner after that path in for of:
C:\...\Python310\Lib\site-packages\QtDesigner\designer.exe
Just click on it, and pin it to your start or taskbar.
Or Simply if you want to download it directly as .exe, But I'm not sure if this can miss some pyqt5-tools:
Qt Designer Download
Go to Your python installation folder and find this followings:
Go here
Lib\site-packages\qt5_applications\Qt\bin
and you will find your qt designer
you should change your version from the newest version to a slightly old one, for example, 3.10 to 3.8 .
it is a normal thing when a new version is released, keep in mind that you have to update pip (using: python -m pip install --upgrade pip )
So after installing the whole 5.5 Qt package, and installing SIP, and the Xcode command line tools, I get this problem when trying to install the PyQt folder i got from the .gz I downloaded from the website
Joshuas-MacBook-Pro-2:PyQt-gpl-5.5 Josh$ python configure.py -q /Users/Josh/Qt/5.5/clang_64/bin -d /Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/
Querying qmake about your Qt installation...
sh: /Users/Josh/Qt/5.5/clang_64/bin: is a directory
Error: PyQt5 requires Qt v5.0 or later. You seem to be using v3. Use the
--qmake flag to specify the correct version of qmake.
However, I clearly have v5.5 of Qt.
Any idea how to fix this or type in a different command to install it directly?
After spending much time getting PyQt working smoothly on a Mac, my strong recommendation is to install PyQt via Homebrew. The steps are very simple:
1) Install homebrew from here
2) Edit your ~./bash_profile to include the following at the top, so that later installs will see the brew versions of installs:
export PATH=/usr/local/bin:$PATH
3) Refresh your terminal window:
>source ~/.bash_profile
4) Then, simply install python, sip, pyqt in that order:
>brew install python
>brew install sip
>brew install pyqt
You should now have a fully working python/pyqt environment that you can customize via pip etc.
I am trying to install wxPython from src as I need the exact version 3.0.2.0 on Ubuntu. (So, I cannot follow the suggesion in the related question) I downloaded the source and did ./configure, make and make install. It seems to have ended without errors with the following message.
The installation of wxWidgets is finished. On certain platforms
(e.g. Linux) you'll now have to run ldconfig if you installed a
shared library and also modify the LD_LIBRARY_PATH (or equivalent)
environment variable. wxWidgets comes with no guarantees and
doesn't claim to be suitable for any purpose.
I confirmed my installation is not working by doing import wx & wx.version(). What needs to be done to complete the installation? Where should I set the LD_LIBRARY_PATH to?
Doing ./configure, make and make install only builds and installs wxWidgets. You also need to build wxPython using the build-wxpython.py script, which by default will also do the wxWidgets portion of the build for you, using known good configure flags. See wxPython/docs/BUILD.txt in the source tarball.
Try to check if wx is in sys.pah.
You can do it with this code
import sys
print sys.path
In output must be something like that /usr/lib/python2.7/dist-packages/wx
If not, adding path to wx folder to system path should solve your problem.
gtk3 should be install first
$sudo apt-get libgtk-3-dev
If you are facing problem to install wxpython on Python3 please use this command to install wxpython
$ pip install -U -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-16.04 wxPython
By this command you can install latest wxPython4 version.
If you are using Windows or macOS
$ pip install -U wxpython
Older Version you can get from this link
https://sourceforge.net/projects/wxpython/files/wxPython/
I'm trying to install PyQt5 on my Mavericks machine.
I have tried to do it like in this link here Installing PyQt5 with Python 3 On OS X
When I try to install qt5 with brew, there comes a warning:
qt5-5.2.1 already installed
But then when I type python configure.py
Terminal says:
querying qmake about your Qt installation... Error: PyQt5 requires Qt
v5.0 or later. You seem to be using v4.8.6. Use the
--qmake flag to specify the correct version of quake.
Can anyone please help me with this?
When you installed Qt via homebrew, you should have received a warning similar to:
This formula is keg-only, so it was not symlinked into /usr/local.
Qt 5 conflicts Qt 4 (which is currently much more widely used).
Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:
LDFLAGS: -L/usr/local/opt/qt5/lib
CPPFLAGS: -I/usr/local/opt/qt5/include
While this information is very helpful, what you are specifically looking for will be in a directory under /usr/local/opt/qt5/$VERSION_OF_QT/bin/ as qmake is a binary utility.
For me, qmake is located at /usr/local/Cellar/qt5/5.3.1/bin/qmake. Take this path and feed it to your --configure switch and you'll be all set!
e.g. python configure.py --qmake /usr/local/Cellar/qt5/5.3.1/bin/qmake
I'm really new to coding, programming, Python, and just computers in general, so I need some help with Canopy. I've been having pretty consistent troubles installing any packages to Canopy; some stuff is in the internal package manager,but whenever it isn't, it's really confusing. I guess I'll list a specific installation.
I'm trying to install "pywcs" (link provided below) to my Win7 64-bit machine. I have Cygwin if that helps at all. I do not know how to go about this; the stuff I found online is pretty confusing, and Cygwin easy_install (filename) never seems to work. Any step-by-step solutions?
The way I installed astropy is as follows.
Open Windows Terminal
Change Directory to C:\Users\<USER NAME>\AppData\Local\Enthought\Canopy32\User\Scripts
Type easy_install.exe astropy
Wait until the download completes, and restart Enthought.
sometimes installing packages can be hard for enthought canopy . You could install all python packages using pip install mrjob command on the its own canopy command prompt
Go to tools tab on the canopy editor ,
Left click on the canopy command prompt ,
Finally pip install <package name> and hit Enter key
The key point is that in order to install a package into any Python distribution (including Canopy Python), you should use that Python to perform the installation. You refer to Cygwin's "easy_install", but you should instead use Canopy's easy_install.
As described in this article, the easiest way to be sure that you are running Canopy's Python (and Canopy's easy_install) is to have Canopy Python on your PATH. This is done by default during Canopy installation, but if you uncheck this option then, or if your Cygwin installation doesn't use your Windows PATH, then you will need to adjust your Cygwin PATH accordingly.
Doing as Sukrit suggests, and running the installation from the Canopy Python Scripts directory, is also a reasonable approach.
Alternatively, depending on its compiler dependencies, you may be able to install astropy from a Windows Command Prompt rather than from Cygwin (of course Canopy must be on the PATH here too, as it would be by default.)
In Linux you can do it as follows.
1) Make sure you are using the Canopy version of Python - check out https://support.enthought.com/entries/23389761-Installing-packages-into-Canopy-User-Python-from-the-command-line
2) At the command prompt use easy_install, for example:
$ easy_install pp==1.5.7
to install version 1.5.7 of pp
Just for information, Astropy is now included by default in Enthought Canopy:
https://www.enthought.com/products/canopy/package-index/