Preparing wheel metadata ... -不动
时间: 2024-04-16 09:30:06 浏览: 16
您好!对于正在准备轮子元数据的情况,可能是因为正在进行一些准备工作,比如下载依赖项或构建所需的文件。这可能需要一些时间,具体时间取决于您的计算机性能和网络连接速度。请耐心等待片刻,它应该会自动完成。如果长时间没有任何进展,请检查您的网络连接或尝试重新启动程序。如果问题仍然存在,请提供更多详细信息以便我能够更好地帮助您。
相关问题
Getting requirements to build wheel ... done Preparing wheel metadata ... done Collecting numpy>=1.17.0; python_version >= "3.7" (from opencv_python) Using cached https://files.pythonhosted.org/packages/97/9f/da37cc4a188a1d5d203d65ab28d6504e17594b5342e0c1dc5610ee6f4535/numpy-1.21.6-cp37-cp37m-win_amd64.whl Building wheels for collected packages: opencv-python Building wheel for opencv-python (PEP 517) ... / WARNING: Subprocess output does not appear to be encoded as cp936 \ WARNING: Subprocess output does not appear to be encoded as cp936 \ WARNING: Subprocess output does not appear to be encoded as cp936 | WARNING: Subprocess output does not appear to be encoded as cp936这是什么情况,如何解决
这是一个警告信息,可能是因为你的终端编码不是UTF-8,而是cp936。建议在执行命令前设置终端编码为UTF-8,或者在执行命令时添加 `-q` 或 `--quiet` 参数,以避免显示警告信息。
例如,在Windows终端中,可以使用以下命令设置编码为UTF-8:
```
chcp 65001
```
然后再执行你的命令即可,例如:
```
pip install opencv-python --quiet
```
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.
这个错误提示是由于你安装的 Python 包需要 Rust 和 Cargo 来编译扩展,但是它们没有被正确安装或者在环境变量 PATH 中没有被添加。你可以通过以下步骤来解决这个问题:
1. 安装 Rust 和 Cargo:可以通过官网 https://rustup.rs/ 安装 Rust 工具链和 Cargo。
2. 确保 Rust 和 Cargo 已经添加到 PATH 环境变量中。
3. 重新运行 pip 安装命令。如果你使用的是虚拟环境,请确保在虚拟环境中安装 Rust 和 Cargo,并且在虚拟环境中运行 pip 命令。