Python 3.6.9 . ImportError: No module named setuptools_rust and a Command "python setup.py egg_info" failed with error code 1
Asked Answered
R

6

11

I am trying to install pyOpenSSl and it shows the following error

Requirement already satisfied: six>=1.5.2 in /home/tony/hx-preinstaller-venv/lib/python3.6/site-packages (from pyOpenSSL) Collecting cryptography>=3.3 (from pyOpenSSL) Using cached https://files.pythonhosted.org/packages/cc/98/8a258ab4787e6f835d350639792527d2eb7946ff9fc0caca9c3f4cf5dcfe/cryptography-3.4.8.tar.gz 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-8toyhikv/cryptography/setup.py", line 14, in <module>
    from setuptools_rust import RustExtension
ModuleNotFoundError: No module named 'setuptools_rust'

The command I ran:

pip install pyOpenSSL
Ravin answered 29/9, 2021 at 7:54 Comment(0)
E
23

Try upgrade pip and install setuptools-rust:

pip install --upgrade pip
pip install setuptools-rust
Edwin answered 29/9, 2021 at 16:47 Comment(0)
S
9

Have you tried upgrading pip itself first?

pip install --upgrade pip
Somite answered 29/9, 2021 at 8:37 Comment(0)
S
3

Use this command if you are on linux
for python3

python3 -m pip install --upgrade pip

for python2

python2 -m pip install --upgrade pip

this worked for me.

Sentient answered 2/2, 2022 at 19:5 Comment(0)
S
1

I had same issue while using 'scrapy' and following command fixed everything for me:

python3 -m pip install scrapy --upgrade --force --user
Spout answered 16/12, 2021 at 17:57 Comment(0)
D
1

Upgrading the pip this way worked for me:

python -m pip install --upgrade pip
Dillman answered 30/12, 2022 at 7:42 Comment(0)
R
0

Try installing setuptools_rust first:

pip install setuptools_rust 

And then installing pyOpenSSL again

Reopen answered 29/9, 2021 at 8:17 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.