【问题标题】:Python 3.6.9 . ImportError: No module named setuptools_rust and a Command "python setup.py egg_info" failed with error code 1蟒蛇 3.6.9 。 ImportError:没有名为 setuptools_rust 的模块和命令“python setup.py egg_info”失败,错误代码为 1
【发布时间】:2021-11-21 03:08:17
【问题描述】:

我正在尝试安装 pyOpenSSl,它显示以下错误

已满足要求:/home/tony/hx-preinstaller-venv/lib/python3.6/site-packages 中的六个>=1.5.2(来自 pyOpenSSL) 收集密码学>=3.3(来自 pyOpenSSL) 使用缓存的https://files.pythonhosted.org/packages/cc/98/8a258ab4787e6f835d350639792527d2eb7946ff9fc0caca9c3f4cf5dcfe/cryptography-3.4.8.tar.gz 命令 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

提前致谢

【问题讨论】:

    标签: python ubuntu pip setuptools pyopenssl


    【解决方案1】:

    尝试先安装 setuptools_rust:

    pip install setuptools_rust 
    

    然后再次安装 pyOpenSSL

    【讨论】:

      【解决方案2】:

      您是否尝试过先升级 pip 本身?

      pip install --upgrade pip
      

      【讨论】:

        【解决方案3】:

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

        pip install --upgrade pip
        pip install setuptools-rust
        

        【讨论】:

          【解决方案4】:

          我在使用“scrapy”时遇到了同样的问题,以下命令为我修复了所有问题:

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

          【讨论】:

            猜你喜欢
            • 2016-12-18
            • 2017-02-20
            • 2018-02-20
            • 1970-01-01
            • 2014-02-26
            • 1970-01-01
            相关资源
            最近更新 更多