PyCharm 3.0无法找到PyQt5 [英] PyCharm 3.0 fails to find PyQt5
问题描述
我安装了Python 3.3.2(x86和x64版本),并在其上安装了PyQt5.1。
I've got Python 3.3.2 installed (both x86 and x64 versions) and PyQt5.1 installed on top of them.
最近我安装了PyCharm 3.0社区版本并配置为使用这些Python解释器。问题是PyQt5没有显示在已安装的软件包列表中,文档无法正常工作( Ctrl + Space
自动完成和 Ctrl + Q
for docs)。
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时,我收到以下错误:
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)
pip.exceptions.DistributionNotFound:找不到PyQt5的全部发行版
pip.exceptions.DistributionNotFound: No distributions at all found for PyQt5
但似乎这是无关的问题。
But it seems that this is unrelated problem.
PyQt5与二进制安装程序一起安装。系统是Win 7 x64。
PyQt5 is installed with binary installer. System is Win 7 x64.
更新:
我发现以前索引的日志无效我试图让事情有效。该日志不包含有关PyQt的错误或警告。具体如下:
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.
推荐答案
无法安装在pip中,但是从源码构建对我来说工作正常。正如评论中提到的那样.exe文件没有附带文档,我认为pycharm不会那样,因为qt是c ++。下载此处。
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.
如果您不想从源代码构建,那么请检查exe文件安装qt5的位置。可能安装顺利,但安装的目录不在路径中。
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.
这篇关于PyCharm 3.0无法找到PyQt5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!