I'm using Python 3.4.0 on ArchLinux (without X11) as guest in a Vagrant box. When running my script I get this error message:
Pyperclip could not find a copy/paste mechanism for your system
According to this link, I've installed xsel and xclip packages but I cannot install gtk nor PyQt4 modules, because I get this another error message:
Could not find a version that satisfies the requirement PyQt4 (from
versions: )
According to this post, I should install python3-pyqt4 package, but the package more near showed by pacman is python-pyqt5 and it requires to install many packages included packages for X11. Is this necessary? I wish to preserve my distro light as possible.
Any solution? Thanks in advance.
This method fixed it for me.
pip install QtPy
also you could refer to this thread for more help
https://pyperclip.readthedocs.io/en/latest/introduction.html#not-implemented-error
Related
When trying to install qt4 for python 2.7 (that I need to run some scripts written by other developers):
$ sudo pip install PyQt4
Could not find a version that satisfies the requirement PyQt4 (from versions: )
No matching distribution found for PyQt4
Additional information:
$ python --version
Python 2.7.15+
$ pip list
Package Version
---------- -------
numpy 1.16.5
pip 19.3
pyqtgraph 0.10.0
setuptools 41.4.0
wheel 0.33.6
Any suggestion on how to install it?
Please note that I have tried the solution proposed here:
pip install PyQt4-4.11.4-cp35-none-win_amd64.whl
ERROR: PyQt4-4.11.4-cp35-none-win_amd64.whl is not a supported wheel on this platform.
I guess because it is not a windows platform, isn't it? I am trying to install it on XUbuntu 18.04.
As suggested in one of the comment by #phd "PyQt4-4.11.4-cp35-none-win_amd64.whl is for Python 3.5 and Python 64-bit. You need to download wheel for Python 2.7".
I have tryed also:
$ pip install PyQt4‑4.11.4‑cp27‑cp27m‑win_amd64.whl
Requirement 'PyQt4‑4.11.4‑cp27‑cp27m‑win_amd64.whl' looks like a filename, but the file does not exist
PyQt4‑4.11.4‑cp27‑cp27m‑win_amd64.whl is not a valid wheel filename.
So the question can be: how to install the right version? How to find the right packet? My problem is exactly this one: I do not know how to move myself in this big forest. Thank you for every suggestion.
Building on sinoroc's answer: PyQt4 is outdated, and only PyQt6 or PyQt5 are available on PIP. See this website.
pip install PyQt6
By default pip looks for project distributions on Pypi. If you ask for pip install PyQt4, then you can also manually look at the page for this PyQt4 project on PyPi. There you will eventually see that there are no distributions at all to download so pip won't be able to install anything on any platform for any Python version at all. You need to look for alternatives.
You can have a look at the homepage of the PyQt project and you will eventually find the page to download the PyQt4 source code. There is a link on this page for the Linux source code of PyQt4, so you might want to have a look at it and see if you can get it installed on your system.
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 )
I want to install pyqt5 on python 2.7. I've tried to download on their website, but I can't open the website. I used:
pip install
and I got:
ERROR: Could not find a version that satisfies the requirement pyqt5 (from versions: none)
ERROR: No matching distribution found for pyqt5
You didn't mention an OS, but here is my experience with OSX - hopefully it is helpful to someone.
pyqt5 installed though pip appears to require python3 - and I couldn't find a way around it. After spending a bit of time trying to figure this out recently, there are two options I know of:
1) build from source, e.g. https://robonobodojo.wordpress.com/2017/02/08/installing-pyqt4-on-mac-osx/ , https://fredrikaverpil.github.io/2015/11/25/compiling-pyqt5-for-python-2-7-on-os-x/, for pyqt4 (just in case), pyqt5, respectively.
2) install using conda https://docs.conda.io/en/latest/miniconda.html
I was unable to get 1) working for me (on OSX 10.14.5) due to, I believe, an issue with paths configuration. But conda worked immediately. Once installed (by choosing the python2 install), just do conda install pyqt.
edit: there is also an Ubuntu guide for building from source here : https://plashless.wordpress.com/2014/03/26/building-pyqt5-for-python2-7-on-a-clean-ubuntu-13-10-build-machine/
pyqt5 requires python 3.4 or later
i know there have already been many such questions asked on this forum but i couldnt find any that helped my particular case.
i am trying to install tkinter(and some other packages) using pip install on windows 10 cmd. but it gives the error
pip install tkinter
Could not find a version that satisfies the requirement tkinter (from
versions: )
No matching distribution found for tkinter
how do i install it? i get the same error for some other packages too. what is the solution that works for any and all future packages i install?
When installing packages with pip, it automatically collects any dependencies of these packages, if they aren't already installed. For example, if you install SciPyand you haven't installed NumPy, pip will automatically install NumPy, because it is listed in SciPy's dependencies.
The error you got happens, when one of the listed requirements of the package you want to install is not availible. This can have a number of causes:
The required package is not availible on PyPi.
The required package or the package you want to install is not compatible with your version of python.
You typed the wrong package name.
When i try pip install tkinter, i get the same error. The reason for that is that tkinter is already included in the python standard library (at least for python 3.x). You shouldn't have to install it. You can verify that tkinter is working by a simple example like
import tkinter as tk
root = tk.Tk()
root.mainloop()
i type the following into the command prompt as administrator:
pip install PyGTK
and get the following error:
Could not find a version that satisfies the requirement PyGTK <from versions:>
No matching distribution found for PyGTK
any thoughts of why this is happening, thank you in advance.
PyGTK is only available for Python 2.6 on Windows.
For more fresh installation instructions see https://pygobject.readthedocs.io/en/latest/getting_started.html
It's pygtk. Case sensitivity has caused the error probably. This has been deprecated for python3 though and has been replaced by pygi.