question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Poetry doesn't fully add some packages (PyQt5, Jupyter)

See original GitHub issue
  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).

Issue

I have to pip install pyqt5 to get pyqt5-sip

(TagDict) Pacharapols-Air:TagDict patarapolw$ python -m desktop
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/Users/patarapolw/PycharmProjects/TagDict/desktop/__main__.py", line 1, in <module>
    from .controller import main
  File "/Users/patarapolw/PycharmProjects/TagDict/desktop/controller.py", line 3, in <module>
    from PyQt5.QtGui import QGuiApplication
ModuleNotFoundError: No module named 'PyQt5.sip'
(TagDict) Pacharapols-Air:TagDict patarapolw$ pip install pyqt5
Requirement already satisfied: pyqt5 in /Users/patarapolw/.local/share/virtualenvs/TagDict/lib/python3.7/site-packages (5.11.2)
Collecting PyQt5_sip<4.20,>=4.19.11 (from pyqt5)
  Downloading https://files.pythonhosted.org/packages/3c/5f/80690ffa65d12cd5977a49d68735d62304f709c32b80b212a1b045523c8d/PyQt5_sip-4.19.12-cp37-cp37m-macosx_10_6_intel.whl (51kB)
    100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 61kB 93kB/s 
poetry 0.11.2 requires cachecontrol[filecache]<0.13.0,>=0.12.4, which is not installed.
poetry 0.11.2 requires cachy<0.3,>=0.2, which is not installed.
poetry 0.11.2 requires cleo<0.7.0,>=0.6.7, which is not installed.
poetry 0.11.2 requires pkginfo<2.0,>=1.4, which is not installed.
poetry 0.11.2 requires pyparsing<3.0,>=2.2, which is not installed.
poetry 0.11.2 requires pyrsistent<0.15.0,>=0.14.2, which is not installed.
poetry 0.11.2 requires pytoml<0.2.0,>=0.1.16, which is not installed.
poetry 0.11.2 requires requests<3.0,>=2.18, which is not installed.
poetry 0.11.2 requires requests-toolbelt<0.9.0,>=0.8.0, which is not installed.
poetry 0.11.2 requires shellingham<2.0,>=1.1, which is not installed.
jupyter 1.0.0 requires ipywidgets, which is not installed.
jupyter 1.0.0 requires jupyter-console, which is not installed.
jupyter 1.0.0 requires qtconsole, which is not installed.
Installing collected packages: PyQt5-sip
Successfully installed PyQt5-sip-4.19.12
(TagDict) Pacharapols-Air:TagDict patarapolw$ 

Now it works.

About Jupyter Notebook, even though it seems not completely installed, I can use it without problems.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
lochshcommented, Jan 7, 2022

PyQt seem to have fixed the issue with their metadata version, but poetry still fails to install pyqt5-qt and pyqt5-sip.

The metadata now:

Metadata-Version: 2.1
Name: PyQt5
Version: 5.15.6
Requires-Python: >=3.6
Summary: Python bindings for the Qt cross platform application toolkit
Home-Page: https://www.riverbankcomputing.com/software/pyqt/
Author: Riverbank Computing Limited
Author-Email: info@riverbankcomputing.com
License: GPL v3
Requires-Dist: PyQt5-sip (>=12.8, <13)
Requires-Dist: PyQt5-Qt5 (>=5.15.2)

Installing with pip successfully installs pyqt5-sip and pyqt5-qt5, and pyqt5 no longer errors trying to find Qt libraries. Could this be an issue with poetry?

I can confirm that doing poetry add pyqt5-sip pyqt5-qt5 resolves the issue, for anyone coming across this page, but obviously it would be better to not have to specify these manually.

0reactions
BenWhettoncommented, Sep 1, 2022

I just bumped into this bug when migrating to poetry. It looks like Poetry is still failing to install PyQt5-Qt5 even though the metadata file appears to be correct now (as far as I can tell).

@sdispater Can we re-open this ticket, or should I make a new one?

Read more comments on GitHub >

github_iconTop Results From Across the Web

python - Poetry already added module, but not installed
After poetry install and open python, I found I could import some module(numpy and pandas), but not others like seaborn, lightgbm and etc....
Read more >
Package List β€” Spack 0.20.0.dev0 documentation
This is a list of things you can install using Spack. It is automatically generated based on the packages in this Spack version....
Read more >
Python desperately needs a better packaging solution than ...
No pipenv, no poetry, no conda, etc from third party devs who sometimes get tired of the pressure [1]. It is immense. Combine...
Read more >
Which not so well known Python packages do you like to ...
One I use everyday is defopt, which allows you to turn python scripts command line tools that accept arguments with a few additional...
Read more >
Code completion doesn't work for cv2 module : PY-35691
It is reproducible if you run pip install opencv-python from the Terminal in PyCharm. When installing with UI, everything is fine. It has...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found