首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >由于生锈组件,pip安装fastapi[all]失败?

由于生锈组件,pip安装fastapi[all]失败?
EN

Stack Overflow用户
提问于 2020-06-15 05:15:27
回答 1查看 5.2K关注 0票数 5

嗨,我正在尝试安装,但是当我安装orjson时,它似乎失败了。

以下是完整的错误代码:

代码语言:javascript
复制
Building wheel for orjson (PEP 517) ... error
  ERROR: Command errored out with exit status 1:
   command: 'd:\pythonapps\fastapi_tutorial\env\scripts\python.exe' 'd:\pythonapps\fastapi_tutorial\env\lib\site-packages\pip\_vendor\pep517\_in_process.py' build_wheel 'C:\Users\User\AppData\Local\Temp\tmp4yope0de'
       cwd: C:\Users\User\AppData\Local\Temp\pip-install-35a1h4do\orjson
  Complete output (50 lines):
     Compiling cfg-if v0.1.10
     Compiling winapi v0.3.8
     Compiling bitflags v1.2.1
     Compiling ryu v1.0.5
     Compiling scopeguard v1.1.0
     Compiling packed_simd v0.3.3
     Compiling serde v1.0.111
     Compiling lexical-core v0.7.4
     Compiling libc v0.2.71
     Compiling version_check v0.9.2
     Compiling smallvec v1.4.0
     Compiling arrayvec v0.5.1
     Compiling encoding_rs v0.8.23
     Compiling static_assertions v1.1.0
     Compiling itoa v0.4.5
     Compiling orjson v3.1.0 (C:\Users\User\AppData\Local\Temp\pip-install-35a1h4do\orjson)
     Compiling rand_core v0.4.2
     Compiling inlinable_string v0.1.11
     Compiling associative-cache v1.0.1
     Compiling once_cell v1.4.0
     Compiling lock_api v0.3.4
     Compiling wyhash v0.3.0
     Compiling pyo3 v0.10.1
  error: failed to run custom build command for `pyo3 v0.10.1`

  Caused by:
    process didn't exit successfully: `C:\Users\User\AppData\Local\Temp\pip-install-35a1h4do\orjson\target\release\build\pyo3-dde0edb355843ae5\build-script-build` (exit code: 1)
  --- stderr
  Error: "Your Rust target architecture (64-bit) does not match your python interpreter (32-bit)"

  warning: build failed, waiting for other jobs to finish...
  thread 'rustc' panicked at 'Box<Any>', src\librustc_errors\lib.rs:912:9
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

  note: the compiler unexpectedly panicked. this is a bug.

  note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

  note: rustc 1.46.0-nightly (4fb54ed48 2020-06-14) running on x86_64-pc-windows-msvc

  note: compiler flags: -Z mutable-noalias -C opt-level=3 -C panic=abort -C linker-plugin-lto -C codegen-units=1 --crate-type lib

  note: some of the compiler flags provided by cargo are hidden

  error: build failed
  💥 maturin failed
    Caused by: Failed to build a native library through cargo
    Caused by: Cargo build finished with "exit code: 101": `cargo rustc --message-format json --manifest-path Cargo.toml --lib --release -- -C link-arg=-s`
  Running `maturin pep517 build-wheel -i python --manylinux=off --strip=on`
  Error: Command '['maturin', 'pep517', 'build-wheel', '-i', 'python', '--manylinux=off', '--strip=on']' returned non-zero exit status 1.
  ----------------------------------------
  ERROR: Failed building wheel for orjson
Failed to build orjson
ERROR: Could not build wheels for orjson which use PEP 517 and cannot be installed directly

请告诉我我能做些什么?我安装了锈蚀装置,并将其设置为每晚。任何帮助都是非常感谢的谢谢!

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-06-15 05:18:25

问题很明显:

您的锈蚀目标体系结构(64位)不匹配您的python解释器(32位)

要么将Python解释器升级到64位,要么使用rustup安装32位锈蚀目标。

编辑: Here是如何手动锁定x86_64机器上的32位

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

https://stackoverflow.com/questions/62381752

复制
相关文章

相似问题

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