I am using PyQt5 to convert a local html file into pdf. The executable was working fine before the pyqt5 module was added. However, now I get a 'could not find QtWebEngineProcess.exe' error. I've read that the issue has been resolved in the later models but I am still experiencing this error. I have the latest version of anaconda and pyqt5.
I read a git thread that asked to use 5.9.2 version of pyqt but that did not solve the error either.
This is the command I'm using to create an executable:
pyinstaller --hidden-import=pkg_resources.py2_warn --onefile Q:\Ray\test.py
I think this happens if you have installed Python with Anaconda which has pyqt5 folder in .../site-packages but actually it's not a pip package and if you pip show pyqt5 it outputs Package(s) not found: pyqt5 so installing pyqt5:
pip install pyqt5
will do the trick. Since the above command installs the latest pyqt5 and Anaconda initially uses older versions make sure to run your app to test everything works fine then recompile your app using Pyinstaller and it will just work.
Hope this helps!
I have followed the following steps in order to set up a data science environment on my laptop, running osx yosemite 10.10.3.
When I enter the suggested command at the end of the guide "ipython qtconsole" I get an error message which suggests that pyqt is not installed / it does not exist where it is currently looking for it:
" ImportError:
Could not load requested Qt binding. Please ensure that
PyQt4 >= 4.7, PyQt5 or PySide >= 1.0.3 is available,
and only one is imported per session.
Currently-imported Qt library: None
PyQt4 installed: False
PyQt5 installed: False
PySide >= 1.0.3 installed: False
Tried to load: ['pyside', 'pyqt', 'pyqt5']"
I have however installed these formulas using brew:
brew install qt
brew install sip
brew install pyqt
and have confirmed that they now are installed by running the command
brew list
and confirmed that they are in the outputted list. So I should have a version of pyqt installed. After installing pyqt I got the following message output:
==> Caveats
Phonon support is broken.
Python modules have been installed and Homebrew's site-packages is not
in your Python sys.path, so you will not be able to import the modules
this formula installed. If you plan to develop with these modules,
please run:
mkdir -p
echo 'import site; site.addsitedir("/usr/local/lib/python2.7/site-packages")' >> homebrew.pth
which I did.
So I am not sure how to proceed, I need to tell ipython where the location of pyqt is on my system I assume, but not sure how to do this.
I added two more steps and I am happily using the qtconsole.
sudo pip install pyside
pyside_postinstall.py -install
It worked for me on OSX 10.10.
Source: The PySide module docs docs
I was having the same exact problem. This solved it: past export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH in the terminal to link your brewed packages with your OS.
Hey I am pretty new to Pyside and am not sure how to download it or Qt? I have a 64-bit Windows computer and am wondering what I need to download once I have downloaded Qt because there is a checklist for like Qt 5.3, Qt 5.2.1, etc. and I am not sure which to download because under those there are multiple options under them like MSCV2012 64-bit and mscv64-bit OpenGL. Basically I am just very lost on what I need and can't seem to find the answer. Could someone enlighten me?
Thanks!
Install pip:
Download pip installer from here and save it in a directory other than C.
If you haven't set your python path: follow this.
Open Command Prompt and cd to that directory where you saved the pip installer.
run: python get-pip.py
Install pyside:
Close and Reopen Command Prompt.
run: cd C:\Python27\Scripts
run: pip install -U PySide
PySide does not yet support the Qt 5.x branch.
Simply running pip install pyside will install bindings that support the Qt 4.8 branch. Thus, you need that version of Qt.
All the steps are mentioned in here, but for your convenience, here goes it inline:
Installing prerequisites
Install latest pip distribution: download get-pip.py [bootstrap.pypa.io] and run it using the python interpreter.
Installing PySide on a Windows System
To install PySide on Windows you can choose from the following options:
Use pip [pypi.python.org] to install the wheel binary packages by issuing the command:
pip install -U PySide
Use setuptools [pypi.python.org] to install the egg binary packages by issuing the command (deprecated):
easy_install -U PySide
Download and install the packages from the PyPI page [pypi.python.org]
Provided binaries are without any other external dependencies. All required Qt libraries, development tools and examples are included.
Then, you can grab the Qt 4.8.6 version from here:
http://qt-project.org/downloads
Please note that there is no installer for VS2012 off-hand, so you should use an older version or mingw. Alternatively, you could also build Qt 4 yourself.
I'm using Python 3.4 on Windows. When I run a script, it complains
ImportError: No Module named 'PyQt4'
So I tried to install it, but pip install PyQt4 gives
Could not find any downloads that satisfy the requirement PyQt4
although it does show up when I run pip search PyQt4. I tried to pip install python-qt, which installed successfully but that didn't solve the problem.
What am I doing wrong?
Here are Windows wheel packages built by Chris Golke - Python Windows Binary packages - PyQt
In the filenames cp27 means C-python version 2.7, cp35 means python 3.5, etc.
Since Qt is a more complicated system with a compiled C++ codebase underlying the python interface it provides you, it can be more complex to build than just a pure python code package, which means it can be hard to install it from source.
Make sure you grab the correct Windows wheel file (python version, 32/64 bit), and then use pip to install it - e.g:
C:\path\where\wheel\is\> pip install PyQt4-4.11.4-cp35-none-win_amd64.whl
Should properly install if you are running an x64 build of Python 3.5.
QT no longer supports PyQt4, but you can install PyQt5 with pip:
pip install PyQt5
You can't use pip. You have to download from the Riverbank website and run the installer for your version of python. If there is no install for your version, you will have to install Python for one of the available installers, or build from source (which is rather involved). Other answers and comments have the links.
If you install PyQt4 on Windows, files wind up here by default:
C:\Python27\Lib\site-packages\PyQt4*.*
but it also leaves a file here:
C:\Python27\Lib\site-packages\sip.pyd
If you copy the both the sip.pyd and PyQt4 folder into your virtualenv things will work fine.
For example:
mkdir c:\code
cd c:\code
virtualenv BACKUP
cd c:\code\BACKUP\scripts
activate
Then with windows explorer copy from C:\Python27\Lib\site-packages the file (sip.pyd) and folder (PyQt4) mentioned above to C:\code\BACKUP\Lib\site-packages\
Then back at CLI:
cd ..
(c:\code\BACKUP)
python backup.py
The problem with trying to launch a script which calls PyQt4 from within virtualenv is that the virtualenv does not have PyQt4 installed and it doesn't know how to reference the default installation described above. But follow these steps to copy PyQt4 into your virtualenv and things should work great.
Earlier PyQt .exe installers were available directly from the website download page. Now with the release of PyQt4.12 , installers have been deprecated. You can make the libraries work somehow by compiling them but that would mean going to great lengths of trouble.
Otherwise you can use the previous distributions to solve your purpose. The .exe windows installers can be downloaded from :
https://sourceforge.net/projects/pyqt/files/PyQt4/PyQt-4.11.4/
It looks like you may have to do a bit of manual installation for PyQt4.
http://pyqt.sourceforge.net/Docs/PyQt4/installation.html
This might help a bit more, it's a bit more in a tutorial/set-by-step format:
http://movingthelamppost.com/blog/html/2013/07/12/installing_pyqt____because_it_s_too_good_for_pip_or_easy_install_.html
With current latest python 3.6.5
pip3 install PyQt5
works fine
For Windows:
download the appropriate version of the PyQt4 from here:
https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyqt4
and install it using pip (example for Python3.6 - 64bit)
pip install PyQt4‑4.11.4‑cp36‑cp36m‑win_amd64.whl
Try this for PyQt5:
pip install PyQt5
Use the operating system on this link for PyQt4.
Or download the supported wheel for your platform on this link.
Else use this link for the windows executable installer.
Hopefully this helps you to install either PyQt4 or PyQt5.
install PyQt5 for Windows 10 and python 3.5+.
pip install PyQt5
If you have error while installing PyQt4.
Error: PyQt4-4.11.4-cp27-cp27m-win_amd64.whl is not a supported wheel on this
platform.
My system type is 64 bit, But to solve this error I have installed PyQt4 of 32 bit windows system, i.e PyQt4-4.11.4-cp27-cp27m-win32.whl - click here to see more versions.
Kindly select appropriate version of PyQt4 according to your installed python version.
You can also use this command to install PyQt5.
pip3 install PyQt5
I am using PyCharm, and was able to install PyQt5.
PyQt4, as well as PyQt4Enhanced and windows_whl both failed to install, I'm guessing that's because Qt4 is no longer supported.
Try using python 3.6,
then install sip
pip install sip
then follow the steps mentioned by #Jay https://stackoverflow.com/a/48078369/8352081
Im planing to do some GUI development using pyqt4 pykde and python3.1 on Kubuntu 10.4. In the research I did I found out that most of the things are available as packages in repositories and some of the packages are preinstalled. Only thing is I'm not able to figure out what to install and what not to. Can someone please give me a list of packages that I need to install to do GUI development using python3.1 pyQt4 and pyKDE.
The qt-designer is inside the new qtcreator (former package was qt-creator).
install -doc packages as you like, also look for -examples, they are very helpful.
for your convenience:
aptitude install
python31
python-qt4
python-qt4-doc
pyqt4-dev-tools
python-kde4
qtcreator
For an IDE, look in question 1 or 2
I guess you need python-qt4 qt4-designer qt4-dev-tools.