发布于2023-10-27 21:44 阅读(1394) 评论(0) 点赞(5) 收藏(4)
我正在尝试使用 python 3.12.0 在 Windows 11 中安装某些依赖项,例如 scipy==1.9.3、scikit-learn==1.2.0、transformers==4.25.1 和 Gunicorn==21.2.0和 pip 23.3.1,但我遇到以下错误:
C:\Users\Vahab>pip install scipy==1.9.3
Collecting scipy==1.9.3
Using cached scipy-1.9.3.tar.gz (42.1 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... error
error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [37 lines of output]
+ meson setup C:\Users\Vahab\AppData\Local\Temp\pip-install-vzr05y28\scipy_fb7ecadda56946cea769390c8e3e8234 C:\Users\Vahab\AppData\Local\Temp\pip-install-vzr05y28\scipy_fb7ecadda56946cea769390c8e3e8234\.mesonpy-q52e28dg -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=C:\Users\Vahab\AppData\Local\Temp\pip-install-vzr05y28\scipy_fb7ecadda56946cea769390c8e3e8234\.mesonpy-q52e28dg\meson-python-native-file.ini
The Meson build system
Version: 1.2.3
Source dir: C:\Users\Vahab\AppData\Local\Temp\pip-install-vzr05y28\scipy_fb7ecadda56946cea769390c8e3e8234
Build dir: C:\Users\Vahab\AppData\Local\Temp\pip-install-vzr05y28\scipy_fb7ecadda56946cea769390c8e3e8234\.mesonpy-q52e28dg
Build type: native build
Project name: SciPy
Project version: 1.9.3
Activating VS 17.7.5
C compiler for the host machine: cl (msvc 19.37.32825 "Microsoft (R) C/C++ Optimizing Compiler Version 19.37.32825 for x64")
C linker for the host machine: link link 14.37.32825.0
C++ compiler for the host machine: cl (msvc 19.37.32825 "Microsoft (R) C/C++ Optimizing Compiler Version 19.37.32825 for x64")
C++ linker for the host machine: link link 14.37.32825.0
Host machine cpu family: x86_64
Host machine cpu: x86_64
Compiler for C supports arguments -Wno-unused-but-set-variable: NO
Compiler for C supports arguments -Wno-unused-but-set-variable: NO (cached)
Compiler for C supports arguments -Wno-unused-function: NO
Compiler for C supports arguments -Wno-conversion: NO
Compiler for C supports arguments -Wno-misleading-indentation: NO
Compiler for C supports arguments -Wno-incompatible-pointer-types: NO
Library m found: NO
..\meson.build:57:0: ERROR: Unknown compiler(s): [['ifort'], ['gfortran'], ['flang'], ['pgfortran'], ['g95']]
The following exception(s) were encountered:
Running `ifort --version` gave "[WinError 2] The system cannot find the file specified"
Running `ifort -V` gave "[WinError 2] The system cannot find the file specified"
Running `gfortran --version` gave "[WinError 2] The system cannot find the file specified"
Running `gfortran -V` gave "[WinError 2] The system cannot find the file specified"
Running `flang --version` gave "[WinError 2] The system cannot find the file specified"
Running `flang -V` gave "[WinError 2] The system cannot find the file specified"
Running `pgfortran --version` gave "[WinError 2] The system cannot find the file specified"
Running `pgfortran -V` gave "[WinError 2] The system cannot find the file specified"
Running `g95 --version` gave "[WinError 2] The system cannot find the file specified"
Running `g95 -V` gave "[WinError 2] The system cannot find the file specified"
A full log can be found at C:\Users\Vahab\AppData\Local\Temp\pip-install-vzr05y28\scipy_fb7ecadda56946cea769390c8e3e8234\.mesonpy-q52e28dg\meson-logs\meson-log.txt
[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.
可能永远不会有针对 cp312 发布的 1.9.3 版本的 scipy 轮子。不过,scipy-1.11.3-cp312-cp312-win_amd64.whl
PyPI 上有可用的(9 月 23 日发布)。
如果您愿意使用 cp311,则可以使用 1.9.3。但是,如果您确实必须使用 cp312,那么您将需要使用更新的 scipy 版本。
我不认为 scipy==1.9.3 会在 cp312 上构建+通过测试,我不会进一步尝试构建它。
作者:黑洞官方问答小能手
链接:https://www.pythonheidong.com/blog/article/2034584/d09bd770828dae2dd75b/
来源:python黑洞网
任何形式的转载都请注明出处,如有侵权 一经发现 必将追究其法律责任
昵称:
评论内容:(最多支持255个字符)
---无人问津也好,技不如人也罢,你都要试着安静下来,去做自己该做的事,而不是让内心的烦躁、焦虑,坏掉你本来就不多的热情和定力
Copyright © 2018-2021 python黑洞网 All Rights Reserved 版权所有,并保留所有权利。 京ICP备18063182号-1
投诉与举报,广告合作请联系vgs_info@163.com或QQ3083709327
免责声明:网站文章均由用户上传,仅供读者学习交流使用,禁止用做商业用途。若文章涉及色情,反动,侵权等违法信息,请向我们举报,一经核实我们会立即删除!