PyCharm 3.0 fails to find PyQt5

删除回忆录丶 提交于 2020-01-31 06:22:18

问题


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.


回答1:


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.

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.




回答2:


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


来源:https://stackoverflow.com/questions/19207645/pycharm-3-0-fails-to-find-pyqt5

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!