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

Python package cryptography is failed to be installed #7403

Closed
oomichi opened this issue Mar 24, 2021 · 1 comment · Fixed by #7404
Closed

Python package cryptography is failed to be installed #7403

oomichi opened this issue Mar 24, 2021 · 1 comment · Fixed by #7404
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@oomichi
Copy link
Contributor

oomichi commented Mar 24, 2021

Environment:

  • Cloud provider or hardware configuration: MS Azure VM

  • OS (printf "$(uname -srm)\n$(cat /etc/os-release)\n"):
    I selected the following OS image on MS Azure VM:

CentOS 7 Linux Min Install
Powered By Tunnelbiz

The result of uname -srm:

Linux 3.10.0-1160.6.1.el7.x86_64 x86_64

The result of cat /etc/os-release:

NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
  • Version of Ansible (ansible --version):

Ansible 2.9.16

  • Version of Python (python --version):

Python 3.6.8

Kubespray version (commit) (git rev-parse --short HEAD):

Release 2.15.0

Command used to invoke ansible:

The original issue report and PR is #7264
and I also can reproduce the issue on the environment which is described at the above.
The following command which installs necessary python packages is failed.

$ sudo pip3 install -r requirements.txt

Output of ansible run:

Collecting ansible==2.9.16 (from -r requirements.txt (line 1))
  Downloading https://files.pythonhosted.org/packages/7b/7e/fdbcb2278e8b201c076e43fe8fad479a3f473f090c6af6dd72f7f03f0478/ansible-2.9.16.tar.gz (14.2MB)
    100% |████████████████████████████████| 14.3MB 77kB/s 
Collecting jinja2==2.11.1 (from -r requirements.txt (line 2))
  Downloading https://files.pythonhosted.org/packages/27/24/4f35961e5c669e96f6559760042a55b9bcfcdb82b9bdb3c8753dbe042e35/Jinja2-2.11.1-py2.py3-none-any.whl (126kB)
    100% |████████████████████████████████| 133kB 7.4MB/s 
Collecting netaddr==0.7.19 (from -r requirements.txt (line 3))
  Downloading https://files.pythonhosted.org/packages/ba/97/ce14451a9fd7bdb5a397abf99b24a1a6bb7a1a440b019bebd2e9a0dbec74/netaddr-0.7.19-py2.py3-none-any.whl (1.6MB)
    100% |████████████████████████████████| 1.6MB 681kB/s 
Collecting pbr==5.4.4 (from -r requirements.txt (line 4))
  Downloading https://files.pythonhosted.org/packages/7a/db/a968fd7beb9fe06901c1841cb25c9ccb666ca1b9a19b114d1bbedf1126fc/pbr-5.4.4-py2.py3-none-any.whl (110kB)
    100% |████████████████████████████████| 112kB 8.6MB/s 
Collecting jmespath==0.9.5 (from -r requirements.txt (line 5))
  Downloading https://files.pythonhosted.org/packages/a3/43/1e939e1fcd87b827fe192d0c9fc25b48c5b3368902bfb913de7754b0dc03/jmespath-0.9.5-py2.py3-none-any.whl
Collecting ruamel.yaml==0.16.10 (from -r requirements.txt (line 6))
  Downloading https://files.pythonhosted.org/packages/a6/92/59af3e38227b9cc14520bf1e59516d99ceca53e3b8448094248171e9432b/ruamel.yaml-0.16.10-py2.py3-none-any.whl (111kB)
    100% |████████████████████████████████| 112kB 8.5MB/s 
Collecting PyYAML (from ansible==2.9.16->-r requirements.txt (line 1))
  Downloading https://files.pythonhosted.org/packages/7a/5b/bc0b5ab38247bba158504a410112b6c03f153c652734ece1849749e5f518/PyYAML-5.4.1-cp36-cp36m-manylinux1_x86_64.whl (640kB)
    100% |████████████████████████████████| 645kB 1.7MB/s 
Collecting cryptography (from ansible==2.9.16->-r requirements.txt (line 1))
  Downloading https://files.pythonhosted.org/packages/fa/2d/2154d8cb773064570f48ec0b60258a4522490fcb115a6c7c9423482ca993/cryptography-3.4.6.tar.gz (546kB)
    100% |████████████████████████████████| 552kB 2.0MB/s 
    Complete output from command python setup.py egg_info:
    
            =============================DEBUG ASSISTANCE==========================
            If you are seeing an error here please try the following to
            successfully install cryptography:
    
            Upgrade to the latest pip and try again. This will fix errors for most
            users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip
            =============================DEBUG ASSISTANCE==========================
    
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-4qsvc342/cryptography/setup.py", line 14, in <module>
        from setuptools_rust import RustExtension
    ModuleNotFoundError: No module named 'setuptools_rust'
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-4qsvc342/cryptography/
@oomichi oomichi added the kind/bug Categorizes issue or PR as related to a bug. label Mar 24, 2021
@oomichi
Copy link
Contributor Author

oomichi commented Mar 24, 2021

After changing requirements.txt like #7264 :

$ git diff
diff --git a/requirements.txt b/requirements.txt
index de174a4..f7f6ad3 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,4 +1,5 @@
 ansible==2.9.16
+cryptography==2.8
 jinja2==2.11.1
 netaddr==0.7.19
 pbr==5.4.4

the package installation is succeeded:

$ sudo pip3 install -r requirements.txt
WARNING: Running pip install with root privileges is generally not a good idea. Try `pip3 install --user` instead.
Collecting ansible==2.9.16 (from -r requirements.txt (line 1))
  Using cached https://files.pythonhosted.org/packages/7b/7e/fdbcb2278e8b201c076e43fe8fad479a3f473f090c6af6dd72f7f03f0478/ansible-2.9.16.tar.gz
Collecting cryptography==2.8 (from -r requirements.txt (line 2))
  Downloading https://files.pythonhosted.org/packages/45/73/d18a8884de8bffdcda475728008b5b13be7fbef40a2acc81a0d5d524175d/cryptography-2.8-cp34-abi3-manylinux1_x86_64.whl (2.3MB)
    100% |████████████████████████████████| 2.3MB 479kB/s 
Collecting jinja2==2.11.1 (from -r requirements.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/27/24/4f35961e5c669e96f6559760042a55b9bcfcdb82b9bdb3c8753dbe042e35/Jinja2-2.11.1-py2.py3-none-any.whl
Collecting netaddr==0.7.19 (from -r requirements.txt (line 4))
  Using cached https://files.pythonhosted.org/packages/ba/97/ce14451a9fd7bdb5a397abf99b24a1a6bb7a1a440b019bebd2e9a0dbec74/netaddr-0.7.19-py2.py3-none-any.whl
Collecting pbr==5.4.4 (from -r requirements.txt (line 5))
  Using cached https://files.pythonhosted.org/packages/7a/db/a968fd7beb9fe06901c1841cb25c9ccb666ca1b9a19b114d1bbedf1126fc/pbr-5.4.4-py2.py3-none-any.whl
Collecting jmespath==0.9.5 (from -r requirements.txt (line 6))
  Using cached https://files.pythonhosted.org/packages/a3/43/1e939e1fcd87b827fe192d0c9fc25b48c5b3368902bfb913de7754b0dc03/jmespath-0.9.5-py2.py3-none-any.whl
Collecting ruamel.yaml==0.16.10 (from -r requirements.txt (line 7))
  Using cached https://files.pythonhosted.org/packages/a6/92/59af3e38227b9cc14520bf1e59516d99ceca53e3b8448094248171e9432b/ruamel.yaml-0.16.10-py2.py3-none-any.whl
Collecting PyYAML (from ansible==2.9.16->-r requirements.txt (line 1))
  Using cached https://files.pythonhosted.org/packages/7a/5b/bc0b5ab38247bba158504a410112b6c03f153c652734ece1849749e5f518/PyYAML-5.4.1-cp36-cp36m-manylinux1_x86_64.whl
Collecting six>=1.4.1 (from cryptography==2.8->-r requirements.txt (line 2))
  Downloading https://files.pythonhosted.org/packages/ee/ff/48bde5c0f013094d729fe4b0316ba2a24774b3ff1c52d924a8a4cb04078a/six-1.15.0-py2.py3-none-any.whl
Collecting cffi!=1.11.3,>=1.8 (from cryptography==2.8->-r requirements.txt (line 2))
  Downloading https://files.pythonhosted.org/packages/2b/cf/9a3b04e57191a970836aeaa8b2075574f02fbdb65d6368457a2f13213e7f/cffi-1.14.5-cp36-cp36m-manylinux1_x86_64.whl (401kB)
    100% |████████████████████████████████| 409kB 2.3MB/s 
Collecting MarkupSafe>=0.23 (from jinja2==2.11.1->-r requirements.txt (line 3))
  Downloading https://files.pythonhosted.org/packages/b2/5f/23e0023be6bb885d00ffbefad2942bc51a620328ee910f64abe5a8d18dd1/MarkupSafe-1.1.1-cp36-cp36m-manylinux1_x86_64.whl
Collecting ruamel.yaml.clib>=0.1.2; platform_python_implementation == "CPython" and python_version < "3.9" (from ruamel.yaml==0.16.10->-r requirements.txt (line 7))
  Downloading https://files.pythonhosted.org/packages/88/ff/ec25dc01ef04232a9e68ff18492e37dfa01f1f58172e702ad4f38536d41b/ruamel.yaml.clib-0.2.2-cp36-cp36m-manylinux1_x86_64.whl (549kB)
    100% |████████████████████████████████| 552kB 1.9MB/s 
Collecting pycparser (from cffi!=1.11.3,>=1.8->cryptography==2.8->-r requirements.txt (line 2))
  Downloading https://files.pythonhosted.org/packages/ae/e7/d9c3a176ca4b02024debf82342dab36efadfc5776f9c8db077e8f6e71821/pycparser-2.20-py2.py3-none-any.whl (112kB)
    100% |████████████████████████████████| 112kB 8.1MB/s 
Installing collected packages: MarkupSafe, jinja2, PyYAML, six, pycparser, cffi, cryptography, ansible, netaddr, pbr, jmespath, ruamel.yaml.clib, ruamel.yaml
  Running setup.py install for ansible ... done
Successfully installed MarkupSafe-1.1.1 PyYAML-5.4.1 ansible-2.9.16 cffi-1.14.5 cryptography-2.8 jinja2-2.11.1 jmespath-0.9.5 netaddr-0.7.19 pbr-5.4.4 pycparser-2.20 ruamel.yaml-0.16.10 ruamel.yaml.clib-0.2.2 six-1.15.0
$

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant