无法使用pip下载scipy for wheel

vybvopom  于 2023-04-12  发布在  其他
关注(0)|答案(1)|浏览(249)

我需要在另一台无法连接到Internet的计算机上安装一些Python包。我尝试使用pip命令访问我在packages.txt中列出的包,并将wheel文件放在./packs中。完整的命令如下:

pip3 download -d ./packs -r packages.txt -i https://mirrors.aliyun.com/pypi/simple/

但是,scipy无法成功转换为wheel格式。因此,一些依赖于scipy的软件包(例如scikit-learnstatsmodels)也无法成功下载。完整的错误消息如下所示。

Downloading https://mirrors.aliyun.com/pypi/packages/84/a9/2bf119f3f9cff1f376f924e39cfae18dec92a1514784046d185731301281/scipy-1.10.1.tar.gz (42.4 MB)
     |████████████████████████████████| 42.4 MB 726 kB/s
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
    Preparing wheel metadata ... error
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\liding\appdata\local\programs\python\python38-32\python.exe' 'c:\users\liding\appdata\local\programs\python\python38-32\lib\site-packages\pip\_vendor\pep517\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\liding\AppData\Local\Temp\tmpcp63m4lc'
         cwd: C:\Users\liding\AppData\Local\Temp\pip-download-8bds6eo1\scipy_8794ca23ac8349ecb38e96bac61f61b7
    Complete output (21 lines):
    + meson setup --prefix=c:\users\liding\appdata\local\programs\python\python38-32 C:\Users\liding\AppData\Local\Temp\pip-download-8bds6eo1\scipy_8794ca23ac8349ecb38e96bac61f61b7 C:\Users\liding\AppData\Local\Temp\pip-download-8bds6eo1\scipy_8794ca23ac8349ecb38e96bac61f61b7\.mesonpy-tq02oyez\build --native-file=C:\Users\liding\AppData\Local\Temp\pip-download-8bds6eo1\scipy_8794ca23ac8349ecb38e96bac61f61b7\.mesonpy-native-file.ini -Ddebug=false -Doptimization=2
    The Meson build system
    Version: 1.0.1
    Source dir: C:\Users\liding\AppData\Local\Temp\pip-download-8bds6eo1\scipy_8794ca23ac8349ecb38e96bac61f61b7
    Build dir: C:\Users\liding\AppData\Local\Temp\pip-download-8bds6eo1\scipy_8794ca23ac8349ecb38e96bac61f61b7\.mesonpy-tq02oyez\build
    Build type: native build
    Project name: SciPy
    Project version: 1.10.1
    WARNING: Failed to activate VS environment: Could not parse vswhere.exe output

    ..\..\meson.build:1:0: ERROR: Unknown compiler(s): [['icl'], ['cl'], ['cc'], ['gcc'], ['clang'], ['clang-cl'], ['pgcc']]
    The following exception(s) were encountered:
    Running `icl ""` gave "[WinError 2] The system cannot find the file specified"
    Running `cl /?` gave "[WinError 2] The system cannot find the file specified"
    Running `cc --version` gave "[WinError 2] The system cannot find the file specified"
    Running `gcc --version` gave "[WinError 2] The system cannot find the file specified"
    Running `clang --version` gave "[WinError 2] The system cannot find the file specified"
    Running `clang-cl /?` gave "[WinError 2] The system cannot find the file specified"
    Running `pgcc --version` gave "[WinError 2] The system cannot find the file specified"

    A full log can be found at C:\Users\liding\AppData\Local\Temp\pip-download-8bds6eo1\scipy_8794ca23ac8349ecb38e96bac61f61b7\.mesonpy-tq02oyez\build\meson-logs\meson-log.txt
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\liding\appdata\local\programs\python\python38-32\python.exe' 'c:\users\liding\appdata\local\programs\python\python38-32\lib\site-packages\pip\_vendor\pep517\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\liding\AppData\Local\Temp\tmpcp63m4lc' Check the logs for full command output.

有什么办法解决这个问题吗?谢谢!

3bygqnnd

3bygqnnd1#

scipy的最新版本没有可用的32位wheel,这可能是pip试图构建wheel的原因,如果你使用64位python,你会有更多的机会。

相关问题