首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >虚拟环境中的pip安装问题??货物,即锈蚀软件包管理器,未安装或不在路径上。

虚拟环境中的pip安装问题??货物,即锈蚀软件包管理器,未安装或不在路径上。
EN

Stack Overflow用户
提问于 2022-03-31 17:05:21
回答 2查看 6K关注 0票数 5

我正在使用python虚拟环境来处理一个项目。在设置了an并从git中提取后,我尝试了pip install -r requirements.txt,但下面出现了一个错误。

代码语言:javascript
复制
Collecting orjson==3.5.2
  Using cached orjson-3.5.2.tar.gz (740 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]

      Cargo, the Rust package manager, is not installed or is not on PATH.
      This package requires Rust and Cargo to compile extensions. Install it through
      the system's package manager or via https://rustup.rs/

      Checking for Rust toolchain....
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

我正在使用PythonVersion3.10.2,PIPVersion22.0.4。

知道怎么解决这个问题吗?我安装了铁锈,但没有修复。

在将虚拟环境移到本地后,我不会收到下面的错误。

代码语言:javascript
复制
Collecting orjson==3.5.2
  Using cached orjson-3.5.2.tar.gz (740 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [11 lines of output]
      💥 maturin failed
        Caused by: Cargo metadata failed. Does your crate compile with `cargo build`?
        Caused by: `cargo metadata` exited with an error: error: failed to run `rustc` to learn about target-specific information

      Caused by:
        process didn't exit successfully: `rustc - --crate-name ___ --print=file-names -Z mutable-noalias=yes --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=cfg` (exit code: 1)
        --- stderr
        error: the option `Z` is only accepted on the nightly compiler
      Error running maturin: Command '['maturin', 'pep517', 'write-dist-info', '--metadata-directory', 'C:\\Users\\jawan\\AppData\\Local\\Temp\\pip-modern-metadata-hjcwzhua', '--interpreter', 'C:\\Users\\jawan\\Desktop\\Programming\\imotor\\Scripts\\python.exe', '--manylinux=off', '--strip=on']' returned non-zero exit status 1.
      Checking for Rust toolchain....
      Running `maturin pep517 write-dist-info --metadata-directory C:\Users\jawan\AppData\Local\Temp\pip-modern-metadata-hjcwzhua --interpreter C:\Users\jawan\Desktop\Programming\imotor\Scripts\python.exe --manylinux=off --strip=on`
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
EN

回答 2

Stack Overflow用户

发布于 2022-09-03 18:08:32

面临着类似的问题。在安装了64位版本的python之后,一切都很好。

票数 0
EN

Stack Overflow用户

发布于 2022-10-08 01:25:04

以上错误是由生锈包造成的。

代码语言:javascript
复制
pywinpty

您所需要做的就是从requirements.txt文件中删除它并重新部署您的应用程序。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71696582

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档