简体   繁体   English

PyCharm 3.0无法找到PyQt5

[英]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. 我安装了Python 3.3.2(x86和x64版本),并在它们之上安装了PyQt5.1。

Recently I installed PyCharm 3.0 Community Edition and configured to work with these Python interpreters. 最近我安装了PyCharm 3.0 Community Edition并配置为使用这些Python解释器。 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). 问题是PyQt5没有显示在已安装的软件包列表中,文档也不起作用( Ctrl+Space为自动完成, Ctrl+Q为docs)。

When PyCharm is quering skeleton generation it seems to process PyQt but to no use. 当PyCharm正在查询骨架生成时,它似乎处理PyQt但没有用。 When I try to install PyQt using packages system inside PyCharm, I get following error: 当我尝试使用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

But it seems that this is unrelated problem. 但似乎这是无关紧要的问题。

PyQt5 is installed with binary installer. PyQt5与二进制安装程序一起安装。 System is Win 7 x64. 系统是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. 该日志不包含有关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. 但是仍然没有报告错误。

Couldn't install in pip either but building from source worked fine for me. 无法安装在pip中,但是从源码构建对我来说工作正常。 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++. 正如评论中提到的那样.exe文件没有附带文档,我认为pycharm不会那样,因为qt是c ++。 Download here . 在这里下载。

在此输入图像描述

if you dont want to build from source then check where did the exe file install qt5. 如果你不想从源代码构建,那么检查exe文件在哪里安装qt5。 Probably the install went fine but the dir installed is not in the path. 可能安装顺利但安装的目录不在路径中。

pip install https://github.com/pyinstaller/pyinstaller/tarball/develop
  1. The above syntax downloads the pyinstaller 上面的语法下载了pyinstaller
  2. Pip install pyqt5 点击安装pyqt5
  3. Make sure you have pyqt5 file in the pyinstaller in users\\appdata..etc 确保在users \\ appdata..etc中的pyinstaller中有pyqt5文件

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM