Poetry incorrectly resolves netmiko dependencies
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 (
-vvvoption).
- OS version and name: Docker python:3.6-alpine
- Poetry version: 0.12.11
- Link of a Gist with the contents of your pyproject.toml file: https://gist.github.com/dmfigol/ec86438a2e46b25b53f196f471caffbc
Issue
It seems that poetry incorrectly resolves netmiko dependencies. Here is the output with poetry in Docker (Python 3.6.7):
/ # poetry add netmiko
Skipping virtualenv creation, as specified in config file.
Using version ^2.3 for netmiko
Updating dependencies
Resolving dependencies... (26.2s)
Package operations: 15 installs, 0 updates, 0 removals
Writing lock file
- Installing pycparser (2.19)
- Installing asn1crypto (0.24.0)
- Installing cffi (1.11.5)
- Installing bcrypt (3.1.6)
- Installing cryptography (2.5)
- Installing pyasn1 (0.4.5)
- Installing pynacl (1.3.0)
- Installing paramiko (2.4.2)
- Installing enum34 (1.1.6) # enum34 is installed when it is not supposed to
- Installing ipaddress (1.0.22)
- Installing pyserial (3.4)
- Installing pyyaml (3.13)
- Installing scp (0.13.0)
- Installing textfsm (0.4.1)
- Installing netmiko (2.3.0)
Here is the output from pip when installing netmiko (enum34 is not installed):
(.test-venv) / # pip install netmiko
Collecting netmiko
...
Successfully installed asn1crypto-0.24.0 bcrypt-3.1.6 cffi-1.11.5 cryptography-2.5 netmiko-2.3.0 paramiko-2.4.2 pyasn1-0.4.5 pycparser-2.19 pynacl-1.3.0 pyserial-3.4 pyyaml-3.13 scp-0.13.0 six-1.12.0 textfsm-0.4.1
You are using pip version 10.0.1, however version 19.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
(.test-venv) / # pip freeze
asn1crypto==0.24.0
bcrypt==3.1.6
cffi==1.11.5
cryptography==2.5
netmiko==2.3.0
paramiko==2.4.2
pyasn1==0.4.5
pycparser==2.19
PyNaCl==1.3.0
pyserial==3.4
PyYAML==3.13
scp==0.13.0
six==1.12.0
textfsm==0.4.1
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:10 (2 by maintainers)
Top Results From Across the Web
How to solve Python poetry dependency error - Stack Overflow
Running the reverse command poetry config virtualenvs.create true solved the problem (maybe add --local to set it to individual projects).
Read more >Simple index - piwheels
... wymypy outshine modern-greek-inflexion explosig-data basicpreprocessing mdx-poetic tox-globinterpreter django-survey-and-report epparsers customcrypto ...
Read more >Python Package Managers Explained - Inedo Blog
Thankfully, pip automates package management by first resolving all dependencies then proceeding to install the request packages.
Read more >Software Packages in "jammy", Subsection python - Ubuntu
... python3-arpys (2.0.2-3) [universe]: ARPES (Angle Resolved PhotoEmission ... (1.7.0-2) [universe]: retrieve and print Python 3 package dependencies ...
Read more >devel/py-setuptools: Python packages installer - FreshPorts
There is no configure plist information for this port. Dependency lines: ${PYTHON_PKGNAMEPREFIX}setuptools>0:devel/py-setuptools@${PY_FLAVOR}. To install the ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Alternatively, if there were a way to tell poetry to explicitly prevent the installation of some package, that would help, at least.
I have exactly the same problem,
openapi-core0.11.1 is usingsys.version_infoto declare requirements and I get enum34 installed in Python 3.7 environment. Which fails spectacularly.I know that the
openapi-corepackage author should fix this by using Environmental Markers. But there hasn’t been a release in months.Ideally, poetry would support temporarily fixing such broken packages by overriding their dependency declarations. Basically what was proposed in https://github.com/python-poetry/poetry/issues/1122#issuecomment-565433003 sounds absolutely epic.
Here’s a workaround for anyone interested:
poetry lockenum34frompoetry.lockpoetry install