Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Cannot install due to outdated packages #604

Open
uecasm opened this issue Mar 15, 2023 · 3 comments
Open

[BUG] Cannot install due to outdated packages #604

uecasm opened this issue Mar 15, 2023 · 3 comments
Labels

Comments

@uecasm
Copy link

uecasm commented Mar 15, 2023

Description

Trying to install as per instructions fails on Debian 10.

Expected behavior

Successful installation.

And for it not to try to downgrade my already-installed docker-compose.

Actual behavior

$ python3 --version
Python 3.7.3
$ docker --version
Docker version 20.10.8, build 3967b7d
$ docker-compose --version
docker-compose version 1.29.2, build 5becea4c
$ cat /etc/issue
Debian GNU/Linux 10 \n \l
$ pip3 install -U iotedgedev
...
argcomplete 1.12.3 has requirement importlib-metadata<5,>=0.23; python_version == "3.7", but you'll have importlib-metadata 6.0.0 which is incompatible.
pyopenssl 23.0.0 has requirement cryptography<40,>=38.0.0, but you'll have cryptography 2.6.1 which is incompatible.
docker 6.0.1 has requirement requests>=2.26.0, but you'll have requests 2.25.1 which is incompatible.
docker-compose 1.29.1 has requirement PyYAML<6,>=3.10, but you'll have pyyaml 6.0 which is incompatible.
docker-compose 1.29.1 has requirement websocket-client<1,>=0.32.0, but you'll have websocket-client 1.5.1 which is incompatible.
iotedgehubdev 0.14.18 has requirement docker==5.0.3, but you'll have docker 6.0.1 which is incompatible.
iotedgehubdev 0.14.18 has requirement pyOpenSSL==22.0.0, but you'll have pyopenssl 23.0.0 which is incompatible.
$ docker-compose --version
docker-compose version 1.29.1, build unknown

Steps to Reproduce

As above.

Environment

Running Debian 10 from a Windows 10 WSL2 environment.

@uecasm uecasm added bug triage Issues that need to be looked at labels Mar 15, 2023
@uecasm
Copy link
Author

uecasm commented Mar 15, 2023

Fun, uninstalling is even worse (although maybe OpenSSL's fault?):

$ pip3 uninstall iotedgedev
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pip/_vendor/__init__.py", line 33, in vendored
    __import__(vendored_name, globals(), locals(), level=0)
ModuleNotFoundError: No module named 'pip._vendor.cachecontrol'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/pip3", line 9, in <module>
    from pip._internal import main
  File "/usr/lib/python3/dist-packages/pip/_internal/__init__.py", line 19, in <module>
    from pip._vendor.urllib3.exceptions import DependencyWarning
  File "/usr/lib/python3/dist-packages/pip/_vendor/__init__.py", line 64, in <module>
    vendored("cachecontrol")
  File "/usr/lib/python3/dist-packages/pip/_vendor/__init__.py", line 36, in vendored
    __import__(modulename, globals(), locals(), level=0)
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
  File "/usr/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/__init__.py", line 9, in <module>
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
  File "/usr/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/wrapper.py", line 1, in <module>
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
  File "/usr/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/adapter.py", line 4, in <module>
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
  File "/usr/share/python-wheels/requests-2.21.0-py2.py3-none-any.whl/requests/__init__.py", line 95, in <module>
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
  File "/usr/share/python-wheels/urllib3-1.24.1-py2.py3-none-any.whl/urllib3/contrib/pyopenssl.py", line 46, in <module>
  File "/home/developer/.local/lib/python3.7/site-packages/OpenSSL/__init__.py", line 8, in <module>
    from OpenSSL import SSL, crypto
  File "/home/developer/.local/lib/python3.7/site-packages/OpenSSL/SSL.py", line 19, in <module>
    from OpenSSL.crypto import (
  File "/home/developer/.local/lib/python3.7/site-packages/OpenSSL/crypto.py", line 3261, in <module>
    name="load_pkcs7_data",
TypeError: deprecated() got an unexpected keyword argument 'name'

After much wailing, gnashing of teeth, rm -rfing, upgrading from Debian 10 to 11, reinstalling, and more gnashing of teeth, I have finally managed to get this to install without breaking pip itself. (I have yet to test if it actually works.)

The magic commands were:

sudo apt install libffi-dev libssl-dev rustc
rm -rf ~/.local/lib/python3.9/site-packages/OpenSSL/
pip3 install -U iotedgedev
rm -rf ~/.local/lib/python3.9/site-packages/OpenSSL/
pip3 install --force-reinstall cryptography==38.0.4 pyopenssl==22.0.0

So on basis of "do I need further support" this can probably be closed, but I'll leave it open in case this gives someone an idea of how something could be improved.

Possibly of note: iotedgehubdev 0.14.18 requires pyOpenSSL==22.0.0 and someone said that >=22.1.0 might fix this?

@konichi3
Copy link
Collaborator

Thanks for reporting and glad to see the workaround worked. Can you please let us know what specific python version causing the installation issue?

@konichi3 konichi3 removed the triage Issues that need to be looked at label Apr 21, 2023
@uecasm
Copy link
Author

uecasm commented Apr 22, 2023

That was in the description 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants