Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PyCharm 3.0 fails to find PyQt5

I've got Python 3.3.2 installed (both x86 and x64 versions) and PyQt5.1 installed on top of them.

Recently I installed PyCharm 3.0 Community Edition and configured to work with these Python interpreters. The problem is that PyQt5 is not shown in the list of installed packages and documentation is not working (both Ctrl+Space to autocomplete and Ctrl+Q for docs).

When PyCharm is quering skeleton generation it seems to process PyQt but to no use. When I try to install PyQt using packages system inside PyCharm, I get following error:

C:\Program Files (x86)\PyCharm3.0\helpers\packaging_tool.py run on 10/06/13 13:58:52
Downloading/unpacking PyQt5
Getting page https://pypi.python.org/simple/PyQt5/
URLs to search for versions for PyQt5: https://pypi.python.org/simple/PyQt5/
Analyzing links from page https://pypi.python.org/simple/PyQt5/
Could not find any downloads that satisfy the requirement PyQt5

No distributions at all found for PyQt5

Exception information:
Traceback (most recent call last):
  File "C:\Python\332_x64\lib\site-packages\pip-1.4.1-py3.3.egg\pip\basecommand.py", line 134, in main
    status = self.run(options, args)
  File "C:\Python\332_x64\lib\site-packages\pip-1.4.1-py3.3.egg\pip\commands\install.py", line 236, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "C:\Python\332_x64\lib\site-packages\pip-1.4.1-py3.3.egg\pip\req.py", line 1085, in prepare_files
     url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
  File "C:\Python\332_x64\lib\site-packages\pip-1.4.1-py3.3.egg\pip\index.py", line 265, in find_requirement
     raise DistributionNotFound('No distributions at all found for %s' % req)

Error:

pip.exceptions.DistributionNotFound: No distributions at all found for PyQt5

But it seems that this is unrelated problem.

PyQt5 is installed with binary installer. System is Win 7 x64.

Update: I've found log from previous index invalidating I tried to make things work. The log contains no errors or warnings concerning PyQt. Specifically it reads as follows:

INFO - .skeletons.PySkeletonRefresher - Home path is C:\Program Files (x86)\PyCharm3.0 
INFO - .skeletons.PySkeletonRefresher - Pregenerated skeletons root is C:\Program Files (x86)\PyCharm3.0\skeletons 
INFO - .skeletons.PySkeletonRefresher - Not found pregenerated skeletons at C:\Program Files (x86)\PyCharm3.0\skeletons\skeletons-win-386-python-3.3.2.zip 
INFO - .skeletons.PySkeletonGenerator - Rebuilding builtin skeletons took 10947 ms 
INFO - .skeletons.PySkeletonRefresher - Skeleton for PyQt5.QAxContainer
<...>
INFO - .skeletons.PySkeletonRefresher - Skeleton for PyQt5._QOpenGLFunctions_ES2

Maybe some problem lies in packaging tool:

INFO - packaging.PyPackageManagerImpl - Running packaging tool: C:/Python/332_x64/python.exe C:\Program Files (x86)\PyCharm3.0\helpers\packaging_tool.py list

But there are no errors reported still.

like image 277
sukhmel Avatar asked Oct 06 '13 10:10

sukhmel


People also ask

Can I use PyQt5 in PyCharm?

With PyCharm 2017 you can install from the ide write the ´import PyQt5´ in your code, press alt enter on the missing import and select "import PyQt5".

Which Python version supports PyQt5?

PyQt5 wheels are specific to a particular version of Python. Only Python v3. 5 and later is supported. Wheels are provide for 32- and 64-bit Windows, 64-bit OS X and 64-bit Linux.

Where is PyQt5?

Once you have both Python and pip installed, use the following commands to install the PyQt5 Designer, tools, and packages. You'll find different libraries with PyQt5 folders installed at this default location: C:\Program Files (x86)\Python36-32\Lib\site-packages (on Windows OS).

How do I get PyQt5?

To install PyQt on Windows there are a few steps you need to take. First use the installer from the qt-project website, from qt to install PyQt. Next you want to install a Python version 3.3 or newer. Check the box to add all of the PyQt5 extras.


2 Answers

Couldn't install in pip either but building from source worked fine for me. As mentioned on the comment the .exe file doesn't come with documentation and i think pycharm wouldn't like that because qt its c++. Download here.

enter image description here

if you dont want to build from source then check where did the exe file install qt5. Probably the install went fine but the dir installed is not in the path.

like image 157
Foo Bar User Avatar answered Oct 13 '22 12:10

Foo Bar User


pip install https://github.com/pyinstaller/pyinstaller/tarball/develop
  1. The above syntax downloads the pyinstaller
  2. Pip install pyqt5
  3. Make sure you have pyqt5 file in the pyinstaller in users\appdata..etc
like image 1
aniket bauskar Avatar answered Oct 13 '22 14:10

aniket bauskar