我安装了 Python 3.3.2(x86 和 x64 版本)并在其上安装了 PyQt5.1。
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).
当 PyCharm 查询骨架生成时,它似乎处理 PyQt 但没有用。当我尝试使用 PyCharm 中的包系统安装 PyQt 时,出现以下错误:
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
但这似乎是一个不相关的问题。
PyQt5 使用二进制安装程序安装。系统是Win 7 x64。
更新:
我发现以前索引中的日志使我试图使事情正常工作。该日志不包含有关 PyQt 的错误或警告。具体内容如下:
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
可能是打包工具有问题:
INFO - packaging.PyPackageManagerImpl - Running packaging tool: C:/Python/332_x64/python.exe C:\Program Files (x86)\PyCharm3.0\helpers\packaging_tool.py list
但仍然没有报告错误。