19

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.

bad_coder
  • 11,289
  • 20
  • 44
  • 72
sukhmel
  • 1,402
  • 16
  • 29
  • try uninstall it and build from source (it will take time, maybe 40 minutes or so depending on your pc spec) i think building from source will work. i am not 100% sure but i think because qt is c++ pycharm will be using the documentation for auto-complete etc. – Foo Bar User Oct 07 '13 at 00:53
  • i'm building from source now i will let it run overnight and post back tomorrow if it worked. – Foo Bar User Oct 07 '13 at 00:54
  • Have you tried to add PyQt path to Interpreter paths in Pycharm? – Nikolai Golub Jan 16 '15 at 21:40

2 Answers2

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.

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.

Foo Bar User
  • 2,401
  • 3
  • 20
  • 26
  • 1
    Your idea about system path seemed good, but PyQt installations are already in PATH. I recall message about no doc bundled with PyQt, but I thought it concerns only Qt documentation itself. I'm not sure if I will be able to build from source soon enough, what is supposed difference between binary installers and building in this case? By the way, PyCharm seems to process PyQt only not adding it to quick doc. Do you know, how can I read skeletons generation log? – sukhmel Oct 07 '13 at 08:12
  • i am not sure what's the difference, i am on linux and my only choice is to build from source, but it worked fine for me. it takes some time, PyQt5 seems to be faster to build from PyQt4. I am not sure for the documentation if its important i recall reading something about it when i was trying to get it working in pycharm2.x. i know theres a log file in user_dir/.Pycharm30/system/log. .Pycharm30 is hidden – Foo Bar User Oct 07 '13 at 08:33
  • I've updated the question to take log into consideration. From what I see it does not seem to be a problem of PyQt visibility. – sukhmel Oct 07 '13 at 08:44
  • I'm running into this as well, with the official Ubuntu Pyqt5 package. – Turtles Are Cute Dec 10 '13 at 18:16
  • @TurtlesAreCute i'll run a virtual machine in the evening and test it on ubuntu too. it works fine for me(on arch) but i build it from source. i'll post back in the evening. – Foo Bar User Dec 11 '13 at 09:25
  • @sukhmel How about the code completion on PyQt5 in PyCharm? I'm not sure whether should PyQt5 be shown in the installed packages list. – Hunger Nov 16 '14 at 08:40
  • @Hunger, not sure, what do you mean. If there would be autocompletion in the first place, I wouldn't check `installed` list. So the answer is no, code completion does not work, it does not complete even module names, not to mention anything deeper. Although I haven't tested this for a while, I should check it in recent versions. – sukhmel Nov 17 '14 at 16:23
  • @sukhmel I test this on my computer, auto-completion works, but PyQt5 isn't shown in the list. That's what I what to say. Hope you can solve this problem. – Hunger Nov 18 '14 at 09:38
1
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