-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
No module named 'setuptools_rust' with cryptography==3.4 #5753
Comments
What version of pip are you using? |
pip 9.0.3 :/ .. the default with centos7 upgrading to pip-21.0.1 fixes the problem :) thanks for the hint. If there is a way to report the error cleanly or force upgrade of pip that would be ideal. Closing anyway. |
I'll see about improving the error message, good idea. |
Thanks for the workaround. In addition to CentOS 7 mentioned in #5753 (comment), Ubuntu 18.04 currently ships Python 3.6/pip 9.0.1 by default so I suspect more installation workflows might be broken by the latest release unless they upgrade Adding 👍 for ideally some mechanism detecting the pip version and minimally some message suggesting to upgrade pip. |
The next build failed with ci / cd. Began to check and saw that the version had changed for cryptography 3.3.2 -> 3.4 pip3 install docker-compose
|
You will need to change https://cryptography.io/en/latest/installation.html#alpine and add
this work for me |
Not me - I'm seeing this now:
I'm swimming in build failures on various platforms caused by this at the moment, so any hints to save me time tracking them all down individually would be appreciated! |
You need latest Alpine with Rust >= 1.45. |
Thanks - yeah, I needed to update to 3.13. |
the same with 3.4.1
|
@stamak your pip version is too old. |
What I've attempted (from python:3.7.5-alpine):
The
|
Why is a new pip version required? For example, we use pip 9.0.1 and are installing paramiko==2.2.2 results in this issue. (paramiko sets a >= dependency) - please understand this has a significant impact. |
You need a more recent pip version that supports |
Installing virtualbmc system-wide on CentOS 8 fails with: ModuleNotFoundError: No module named 'setuptools_rust' This error appeared following the release of cryptography 3.4, which now includes Rust code. It can be installed without Rust using a Python wheel, but only with more recent pip than version 9.0.3 available as RPM on CentOS 8. The cryptography bug report [1] recommends pip>=19.1.1. Also ignore PyYAML when installing system-wide to avoid conflicts with an existing RPM package installation. [1] pyca/cryptography#5753 Change-Id: Ibd61e090611b3b7a7e0670c854362b512454bf3c Story: 2008607 Task: 41788
* Update tenks from branch 'master' to f34bb772a018d3ee3a2872358542ad51c22fc06e - Fix virtualbmc installation after release of cryptography 3.4 Installing virtualbmc system-wide on CentOS 8 fails with: ModuleNotFoundError: No module named 'setuptools_rust' This error appeared following the release of cryptography 3.4, which now includes Rust code. It can be installed without Rust using a Python wheel, but only with more recent pip than version 9.0.3 available as RPM on CentOS 8. The cryptography bug report [1] recommends pip>=19.1.1. Also ignore PyYAML when installing system-wide to avoid conflicts with an existing RPM package installation. [1] pyca/cryptography#5753 Change-Id: Ibd61e090611b3b7a7e0670c854362b512454bf3c Story: 2008607 Task: 41788
I'm using pip 21.0.1 (Python 3.8) on Ubuntu 18.04, and I'm still getting this error. I pinned cryptography to 3.3 for now. |
Can you share some instructions to reproduce?
…On Mon, Feb 8, 2021 at 12:48 PM John Velonis ***@***.***> wrote:
I'm using pip 21.0.1 (Python 3.8) on Ubuntu 18.04, and I'm still getting
this error. I pinned cryptography to 3.3 for now.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#5753 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAAGBETUGTS3ZVG3RQHUZLS6APYNANCNFSM4XHZOHNA>
.
--
All that is necessary for evil to succeed is for good people to do nothing.
|
My build uses Packer to create a container image based on the stock ubuntu:bionic image. It runs the following as root:
|
The problem is almost certainly that you have a different pip inside your
virtualenv than you do outside of it. Try adding a `pip3 install -U pip`
right after your source the venv.
…On Mon, Feb 8, 2021 at 1:17 PM John Velonis ***@***.***> wrote:
My build uses Packer to create a container image based on the stock
ubuntu:bionic image. It runs the following as root:
#!/bin/bash -ex
PYTHON_VERSION=3.8
export DEBIAN_FRONTEND=noninteractive
apt-get -y update
apt-get -y upgrade
apt-get install -y python${PYTHON_VERSION}
apt-get install -y python3-pip
# Make sure we have the latest pip (the package may be out of date)
python${PYTHON_VERSION} -m pip install -U pip
pip3 --version
apt-get install -y python${PYTHON_VERSION}-venv
mkdir /app
cp requirements.txt /app/requirements.txt
# Install the libraries in a virtual environment
cd /app
python${PYTHON_VERSION} -m venv .venv
source .venv/bin/activate
pip3 install -r /app/requirements.txt
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#5753 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAAGBHTR44CWH7QCUDGW33S6ATDBANCNFSM4XHZOHNA>
.
--
All that is necessary for evil to succeed is for good people to do nothing.
|
That did it, thanks! |
The cryptography package now requires pip 19+ which is not available by default when using the distribution packages. pyca/cryptography#5753 To resolve this, we upgrade pip in the virtualenv if it is not new enough. We maintain the pin on <20 to ensure that it is usable in both python2 and python3 environments and that it doesn't bring any new setuptools requirements into the mix. JIRA: RHOSINFRA-3877 Change-Id: I394877cd7ea856f37585986328c407665702ba98
Molecule jobs[0] fails with below error:- ModuleNotFoundError: No module named 'setuptools_rust' This error appeared following the release of cryptography 3.4, which now includes Rust code. It can be installed without Rust using a Python wheel, but only with more recent pip than version 9.0.3 available as RPM on CentOS 8. The cryptography bug report [1] recommends pip>=19.1.1. [0] https://e99635be2c7386b5beda-3dea60a35fb0d38e41c535f13b48e895.ssl.cf1.rackcdn.com/773531/1/gate/tripleo-ansible-centos-8-molecule-tripleo_network_config/b1284cd/job-output.txt [1] pyca/cryptography#5753 Related-Bug: #1915101 Change-Id: I3650a68640a0ec846be24014ebc6a71110b2f6f7 (cherry picked from commit f8a286c)
Molecule jobs[0] fails with below error:- ModuleNotFoundError: No module named 'setuptools_rust' This error appeared following the release of cryptography 3.4, which now includes Rust code. It can be installed without Rust using a Python wheel, but only with more recent pip than version 9.0.3 available as RPM on CentOS 8. The cryptography bug report [1] recommends pip>=19.1.1. [0] https://e99635be2c7386b5beda-3dea60a35fb0d38e41c535f13b48e895.ssl.cf1.rackcdn.com/773531/1/gate/tripleo-ansible-centos-8-molecule-tripleo_network_config/b1284cd/job-output.txt [1] pyca/cryptography#5753 Related-Bug: #1915101 Change-Id: I3650a68640a0ec846be24014ebc6a71110b2f6f7 (cherry picked from commit f8a286c)
The base nodeset is still bionic, but at least cryptography fails to build (after pyca/cryptography#5753). Long-term is probably the long term fix (the base nodesets are going to switch to focal at some point, and the override could be then removed). Change-Id: Ie339113d19fe93bb6f6aff14eab2783df22373a2
Molecule jobs[0] fails with below error:- ModuleNotFoundError: No module named 'setuptools_rust' This error appeared following the release of cryptography 3.4, which now includes Rust code. It can be installed without Rust using a Python wheel, but only with more recent pip than version 9.0.3 available as RPM on CentOS 8. The cryptography bug report [1] recommends pip>=19.1.1. [0] https://e99635be2c7386b5beda-3dea60a35fb0d38e41c535f13b48e895.ssl.cf1.rackcdn.com/773531/1/gate/tripleo-ansible-centos-8-molecule-tripleo_network_config/b1284cd/job-output.txt [1] pyca/cryptography#5753 Related-Bug: #1915101 Change-Id: Ib5baad39dd7e43dff9046178c00b0f836dc18bae
* Update tripleo-validations from branch 'master' to 0bf795117387177921b86f1e283fc16c204d96bf - Fix molecule jobs after release of cryptography3.4 Molecule jobs[0] fails with below error:- ModuleNotFoundError: No module named 'setuptools_rust' This error appeared following the release of cryptography 3.4, which now includes Rust code. It can be installed without Rust using a Python wheel, but only with more recent pip than version 9.0.3 available as RPM on CentOS 8. The cryptography bug report [1] recommends pip>=19.1.1. [0] https://e99635be2c7386b5beda-3dea60a35fb0d38e41c535f13b48e895.ssl.cf1.rackcdn.com/773531/1/gate/tripleo-ansible-centos-8-molecule-tripleo_network_config/b1284cd/job-output.txt [1] pyca/cryptography#5753 Related-Bug: #1915101 Change-Id: Ib5baad39dd7e43dff9046178c00b0f836dc18bae
Installing kolla-ansible system-wide on CentOS 8 fails with: ModuleNotFoundError: No module named 'setuptools_rust' This error appeared following the release of cryptography 3.4, which now includes Rust code. It can be installed without Rust using a Python wheel, but only with more recent pip than version 9.0.3 available as RPM on CentOS 8. The cryptography bug report [1] recommends pip>=19.1.1. This change switches to using pip --user when installing kolla-ansible. Also fixes an issue with ansible-lint which was failing on etc/kolla/globals.yml due to a missing space before comments. [1] pyca/cryptography#5753 Change-Id: Ifaf1948ed5d42eebaa62d7bad375bbfc12b134d5 Closes-Bug: #1915141
* Update kolla-ansible from branch 'master' to 3dd6834a618d3ac83a6c0e301182f7b6a0897cf2 - CI: fix kolla-ansible installation after cryptography 3.4 release Installing kolla-ansible system-wide on CentOS 8 fails with: ModuleNotFoundError: No module named 'setuptools_rust' This error appeared following the release of cryptography 3.4, which now includes Rust code. It can be installed without Rust using a Python wheel, but only with more recent pip than version 9.0.3 available as RPM on CentOS 8. The cryptography bug report [1] recommends pip>=19.1.1. This change switches to using pip --user when installing kolla-ansible. Also fixes an issue with ansible-lint which was failing on etc/kolla/globals.yml due to a missing space before comments. [1] pyca/cryptography#5753 Change-Id: Ifaf1948ed5d42eebaa62d7bad375bbfc12b134d5 Closes-Bug: #1915141
Molecule jobs[0] fails with below error:- ModuleNotFoundError: No module named 'setuptools_rust' This error appeared following the release of cryptography 3.4, which now includes Rust code. It can be installed without Rust using a Python wheel, but only with more recent pip than version 9.0.3 available as RPM on CentOS 8. The cryptography bug report [1] recommends pip>=19.1.1. [0] https://e99635be2c7386b5beda-3dea60a35fb0d38e41c535f13b48e895.ssl.cf1.rackcdn.com/773531/1/gate/tripleo-ansible-centos-8-molecule-tripleo_network_config/b1284cd/job-output.txt [1] pyca/cryptography#5753 Related-Bug: #1915101 Depends-On: https://review.opendev.org/c/openstack/tripleo-validations/+/774814 Change-Id: Ib5baad39dd7e43dff9046178c00b0f836dc18bae (cherry picked from commit 0bf7951)
* Update kolla-ansible from branch 'master' to 638e00cfb1ba93448eb12efbd8d3f3c2662fbe53 - Merge "CI: fix ceph-ansible installation after cryptography 3.4 release" - CI: fix ceph-ansible installation after cryptography 3.4 release Installing ceph-ansible in the virtualenv on CentOS 8 fails with: ModuleNotFoundError: No module named 'setuptools_rust' This error appeared following the release of cryptography 3.4, which now includes Rust code. It can be installed without Rust using a Python wheel, but only with more recent pip than version 9.0.3 available as RPM on CentOS 8. The cryptography bug report [1] recommends pip>=19.1.1. This change upgrades pip in the virtualenv before installing ceph-ansible. [1] pyca/cryptography#5753 Change-Id: I47473de6f71c422db2238d653c2d8f379c55e79b
Installing ceph-ansible in the virtualenv on CentOS 8 fails with: ModuleNotFoundError: No module named 'setuptools_rust' This error appeared following the release of cryptography 3.4, which now includes Rust code. It can be installed without Rust using a Python wheel, but only with more recent pip than version 9.0.3 available as RPM on CentOS 8. The cryptography bug report [1] recommends pip>=19.1.1. This change upgrades pip in the virtualenv before installing ceph-ansible. [1] pyca/cryptography#5753 Change-Id: I47473de6f71c422db2238d653c2d8f379c55e79b
Installing kolla-ansible system-wide on CentOS 8 fails with: ModuleNotFoundError: No module named 'setuptools_rust' This error appeared following the release of cryptography 3.4, which now includes Rust code. It can be installed without Rust using a Python wheel, but only with more recent pip than version 9.0.3 available as RPM on CentOS 8. The cryptography bug report [1] recommends pip>=19.1.1. This change switches to using pip --user when installing kolla-ansible. Also fixes an issue with ansible-lint which was failing on etc/kolla/globals.yml due to a missing space before comments. This Victoria backport also includes I47473de6f71c422db2238d653c2d8f379c55e79b, which fixes a similar issue with ceph-ansible. (cherry picked from commit 5fc7707) This Victoria backport also includes I4c65a428facdf6d4ce28d97a868589aeae4c856e, which drops lower-constraints testing. Per our PTG resolution [2] and general OpenStack resolution [3], lower-constraints are not worth the extra work and confusion they introduce. This patch drops them along with all mentions. (cherry picked from commit 604d85b) [1] pyca/cryptography#5753 [2] http://lists.openstack.org/pipermail/openstack-discuss/2020-October/018445.html [3] http://lists.openstack.org/pipermail/openstack-discuss/2020-December/019521.html Change-Id: Ifaf1948ed5d42eebaa62d7bad375bbfc12b134d5 (cherry picked from commit 3dd6834) Closes-Bug: #1915141
not available by default when using the distribution packages pyca/cryptography#5753 To resolve this, we upgrade pip in the virtualenv if it is not new enough. We maintain the pin on <20 to ensure that it is usable in both python2 and python3 environments and that it doesn't bring any new setuptools requirements into the mix. Change-Id: I1adb92ee823558bd4e6b70ca961669ccf3e0434b
Installing ceph-ansible in the virtualenv on CentOS 8 fails with: ModuleNotFoundError: No module named 'setuptools_rust' This error appeared following the release of cryptography 3.4, which now includes Rust code. It can be installed without Rust using a Python wheel, but only with more recent pip than version 9.0.3 available as RPM on CentOS 8. The cryptography bug report [1] recommends pip>=19.1.1. This change upgrades pip in the virtualenv before installing ceph-ansible. [1] pyca/cryptography#5753 Change-Id: I47473de6f71c422db2238d653c2d8f379c55e79b (cherry picked from commit 5fc7707)
You may also switch to |
Molecule jobs[0] fails with below error:- ModuleNotFoundError: No module named 'setuptools_rust' This error appeared following the release of cryptography 3.4, which now includes Rust code. It can be installed without Rust using a Python wheel, but only with more recent pip than version 9.0.3 available as RPM on CentOS 8. The cryptography bug report [1] recommends pip>=19.1.1. [0] https://e99635be2c7386b5beda-3dea60a35fb0d38e41c535f13b48e895.ssl.cf1.rackcdn.com/773531/1/gate/tripleo-ansible-centos-8-molecule-tripleo_network_config/b1284cd/job-output.txt [1] pyca/cryptography#5753 Related-Bug: #1915101 Depends-On: https://review.opendev.org/c/openstack/tripleo-validations/+/774814 Change-Id: Ib5baad39dd7e43dff9046178c00b0f836dc18bae (cherry picked from commit 0bf7951) (cherry picked from commit 90b47a4)
Molecule jobs[0] fails with below error:- ModuleNotFoundError: No module named 'setuptools_rust' This error appeared following the release of cryptography 3.4, which now includes Rust code. It can be installed without Rust using a Python wheel, but only with more recent pip than version 9.0.3 available as RPM on CentOS 8. The cryptography bug report [1] recommends pip>=19.1.1. [0] https://e99635be2c7386b5beda-3dea60a35fb0d38e41c535f13b48e895.ssl.cf1.rackcdn.com/773531/1/gate/tripleo-ansible-centos-8-molecule-tripleo_network_config/b1284cd/job-output.txt [1] pyca/cryptography#5753 Related-Bug: #1915101 Depends-On: https://review.opendev.org/c/openstack/tripleo-validations/+/774814 Change-Id: Ib5baad39dd7e43dff9046178c00b0f836dc18bae (cherry picked from commit 0bf7951) (cherry picked from commit 90b47a4) (cherry picked from commit b1ddfda)
docker-compose 1.27.4 to 1.28.5 gitpython 3.1.11 to 3.1.14 ython:3.9.1-alpine to ython:3.9.2-alpine
For anyone else running into this same issue, for whom updating pip is not enough, here's what worked for me. While installing cryptography on a Debian 10 Buster docker container, I also had to upgrade setuptools (40.8.0 -> 56.0.0), so the command that fixed my issues was:
|
Run this command inside your venv. |
EDIT: tl;dr: run "pip install --upgrade pip". You don't need to install Rust! Use --prefer-binary to make sure you're not rebuilding from sources.
"cryptography<3.4"
works just fine. Anything I am doing wrong ?
The text was updated successfully, but these errors were encountered: