如何让SciPy在2023年为Windows 10工作?

knsnq2tg  于 8个月前  发布在  Windows
关注(0)|答案(1)|浏览(98)

长话短说,我知道我的问题来自哪里,但还没有找到解决方案。
我得到的错误粘贴在下面:

pip install scipy (and other variations like --upgrade, making sure pip is most recent, etc. - almost certain its not a pip issue)

  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [13 lines of output]
      + meson setup --prefix=C:\users\w\appdata\local\programs\python\python38-32 C:\Users\w\AppData\Local\Temp\pip-install-bf55dgso\scipy_82bfcabbf1854ff981dec7247a79719c C:\Users\w\AppData\Local\Temp\pip-install-bf55dgso\scipy_82bfcabbf1854ff981dec7247a79719c\.mesonpy-wjzxo0cz\build --native-file=C:\Users\w\AppData\Local\Temp\pip-install-bf55dgso\scipy_82bfcabbf1854ff981dec7247a79719c\.mesonpy-native-file.ini -Ddebug=false -Doptimization=2
      The Meson build system
      Version: 1.2.1
      Source dir: C:\Users\w\AppData\Local\Temp\pip-install-bf55dgso\scipy_82bfcabbf1854ff981dec7247a79719c
      Build dir: C:\Users\w\AppData\Local\Temp\pip-install-bf55dgso\scipy_82bfcabbf1854ff981dec7247a79719c\.mesonpy-wjzxo0cz\build
      Build type: native build
      Project name: SciPy
      Project version: 1.10.1
      Activating VS 16.3.9
     
      ..\..\meson.build:1:0: ERROR: Compiler cl cannot compile programs.
     
      A full log can be found at C:\Users\w\AppData\Local\Temp\pip-install-bf55dgso\scipy_82bfcabbf1854ff981dec7247a79719c\.mesonpy-wjzxo0cz\build\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

据我所知,SciPy在Windows上有问题,这是过去十年左右的一个有据可查的问题--与缺乏编译器有关--而Linux/MacOS由于gcc而没有这个问题。这是我的问题:大多数解决方案引用http://www.lfd.uci.edu/~gohlke/pythonlibs/-告诉我下载匹配的.whl文件,它应该是固定的,如在回答here。问题是,gohlke链接在2023年断开,并指向未找到的页面。
虽然不是修复的硬性要求,但我个人宁愿不从互联网上下载来源不明的文件-但是,如果有人有Windows 10 64位的.whl副本,我想这比擦拭我的笔记本电脑并使其运行Ubuntu要好。

hvvq6cgz

hvvq6cgz1#

您已经(很可能是无意中)安装了32位版本的Python3.8,从您的错误消息中可以明显看出,该消息指出了Python安装的路径

C:\users\w\appdata\local\programs\python\python38-32

完全卸载它并安装一个64位版本的Python。那你就不会再面临任何问题了。
由于在当前的scipy中没有32位windows的whl文件(甚至不确定其他版本是否有),pip默认从源代码构建。对于C后端的库来说,这可能是相当棘手的

相关问题