Reputation: 1
I have currently awscli==1.32.2 i am having dependeny coflict between cryptography,openssl can you tell on which version they will work together with no dependency conflict
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
pyopenssl 23.3.0 requires cryptography<42,>=41.0.5, but you have cryptography 38.0.4 which is incompatible.
Successfully uninstalled cryptography-38.0.4
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. awscli 2.9.19 requires cryptography<=38.0.5,>=3.3.2, but you have cryptography 41.0.7 which is incompatible.
I tried to uninstall the cryptography and install it again but it didnt work . how can i know which versions are compatible to each other
Upvotes: 0
Views: 572
Reputation: 763
There are several ways to see the dependencies. The more complicated way is to find the "METADATA" file associated with the package you are interested in. You can do that by first running the "pip show" command with the package name as the argument. For example:
$ pip show pyOpenSsl
Name: pyOpenSSL
Version: 23.3.0
Summary: Python wrapper module around the OpenSSL library
Home-page: https://pyopenssl.org/
Author: The pyOpenSSL developers
Author-email: [email protected]
License: Apache License, Version 2.0
Location: /home/testuser/.local/lib/python3.11/site-packages
Requires: cryptography
Required-by:
Then go to the Location and look for the package name with "-versionNumber.dist-info" appended. For example:
pyOpenSSL-23.3.0.dist-info
If you look in that directory, you should find the METADATA file. And at the top of that file should have the dependency information for the package. Each dependency is labeled with "RequiresDist:" For example:
$ more METADATA
Metadata-Version: 2.1
Name: awscli
Version: 1.32.5
Summary: Universal Command Line Environment for AWS.
Home-page: http://aws.amazon.com/cli/
Author: Amazon Web Services
License: Apache License 2.0
Project-URL: Source, https://github.com/aws/aws-cli
Project-URL: Reference, https://docs.aws.amazon.com/cli/latest/reference/
Project-URL: Changelog, https://github.com/aws/aws-cli/blob/develop/CHANGELOG.rst
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: Natural Language :: English
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >= 3.8
License-File: LICENSE.txt
Requires-Dist: botocore (==1.34.5)
Requires-Dist: docutils (<0.17,>=0.10)
Requires-Dist: s3transfer (<0.10.0,>=0.9.0)
Requires-Dist: PyYAML (<6.1,>=3.10)
Requires-Dist: colorama (<0.4.5,>=0.2.5)
Requires-Dist: rsa (<4.8,>=3.1.2)
Now for an easier way is to install the 'pipdeptree' command:
pip install pipdeptree
It is really more of a command than a python package. After installation you just run it:
$ pipdeptree
awscli==1.32.5
├── botocore [required: ==1.34.5, installed: 1.34.5]
│ ├── jmespath [required: >=0.7.1,<2.0.0, installed: 1.0.1]
│ ├── python-dateutil [required: >=2.1,<3.0.0, installed: 2.8.2]
│ │ └── six [required: >=1.5, installed: 1.16.0]
│ └── urllib3 [required: >=1.25.4,<2.1, installed: 2.0.7]
├── colorama [required: >=0.2.5,<0.4.5, installed: 0.4.4]
├── docutils [required: >=0.10,<0.17, installed: 0.16]
├── PyYAML [required: >=3.10,<6.1, installed: 6.0.1]
├── rsa [required: >=3.1.2,<4.8, installed: 4.7.2]
│ └── pyasn1 [required: >=0.1.3, installed: 0.5.1]
└── s3transfer [required: >=0.9.0,<0.10.0, installed: 0.9.0]
└── botocore [required: >=1.33.2,<2.0a.0, installed: 1.34.5]
├── jmespath [required: >=0.7.1,<2.0.0, installed: 1.0.1]
├── python-dateutil [required: >=2.1,<3.0.0, installed: 2.8.2]
│ └── six [required: >=1.5, installed: 1.16.0]
└── urllib3 [required: >=1.25.4,<2.1, installed: 2.0.7]
pip==23.3.2
pipdeptree==2.13.1
pyOpenSSL==23.3.0
└── cryptography [required: >=41.0.5,<42, installed: 41.0.7]
└── cffi [required: >=1.12, installed: 1.16.0]
└── pycparser [required: Any, installed: 2.21]
setuptools==66.1.1
wheel==0.38.4
Upvotes: 0