ubuntu Python 3.6.9 .导入错误:没有名为setuptools_rust的模块和命令“python setup.py egg_info”失败,错误代码为1

66bbxpm5  于 2023-01-01  发布在  Python
关注(0)|答案(6)|浏览(317)

我正在尝试安装pyOpenSSl,但它显示以下错误
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'

我运行的命令

pip install pyOpenSSL

先谢了

91zkwejq

91zkwejq1#

尝试升级pip并安装setuptools-rust:

pip install --upgrade pip
pip install setuptools-rust
wsewodh2

wsewodh22#

你试过先升级pip本身吗?

pip install --upgrade pip
hi3rlvi2

hi3rlvi23#

我有同样的问题,而使用'scrapy'和以下命令为我修复一切:

python3 -m pip install scrapy --upgrade --force --user
czfnxgou

czfnxgou4#

请先尝试安装setuptools_rust:

pip install setuptools_rust

然后再次安装pyOpenSSL

s8vozzvw

s8vozzvw5#

如果您使用的是Linux,请使用此命令

    • Python3**
python3 -m pip install --upgrade pip
    • Python2**
python2 -m pip install --upgrade pip

这对我很有效。

fdbelqdn

fdbelqdn6#

升级pip的方法对我很有效:

python -m pip install --upgrade pip

相关问题