当前位置:   article > 正文

error: subprocess-exited-with-error_getting requirements to build wheel ... error erro

getting requirements to build wheel ... error error: subprocess-exited-with-

本地venv pip install scipy报错如下:

  1. (venv) D:\Desktop\TF-word2vec-textCNN文本分类>pip install scipy
  2. Collecting scipy
  3. Using cached scipy-1.10.1.tar.gz (42.4 MB)
  4. Installing build dependencies ... done
  5. Getting requirements to build wheel ... done
  6. Installing backend dependencies ... done
  7. Preparing metadata (pyproject.toml) ... error
  8. error: subprocess-exited-with-error
  9. × Preparing metadata (pyproject.toml) did not run successfully.
  10. │ exit code: 2
  11. ╰─> [27 lines of output]
  12. + meson setup --prefix=D:\Users\zhouteng\AppData\Local\Programs\Python\Python39-32 C:\Users\zhouteng\AppData\Local\Temp\pip-install-u35quwpt\scipy_2a235f90b96e48988a292655b43a243d C
  13. :\Users\zhouteng\AppData\Local\Temp\pip-install-u35quwpt\scipy_2a235f90b96e48988a292655b43a243d\.mesonpy-2kbr4kjz\build --native-file=C:\Users\zhouteng\AppData\Local\Temp\pip-install-u35q
  14. uwpt\scipy_2a235f90b96e48988a292655b43a243d\.mesonpy-native-file.ini -Ddebug=false -Doptimization=2
  15. Traceback (most recent call last):
  16. File "C:\Users\zhouteng\AppData\Local\Temp\pip-build-env-71x1wfcu\overlay\Lib\site-packages\mesonbuild\mesonmain.py", line 194, in run
  17. return options.run_func(options)
  18. File "C:\Users\zhouteng\AppData\Local\Temp\pip-build-env-71x1wfcu\overlay\Lib\site-packages\mesonbuild\msetup.py", line 318, in run
  19. app.generate()
  20. File "C:\Users\zhouteng\AppData\Local\Temp\pip-build-env-71x1wfcu\overlay\Lib\site-packages\mesonbuild\msetup.py", line 189, in generate
  21. env = environment.Environment(self.source_dir, self.build_dir, self.options)
  22. File "C:\Users\zhouteng\AppData\Local\Temp\pip-build-env-71x1wfcu\overlay\Lib\site-packages\mesonbuild\environment.py", line 508, in __init__
  23. config = coredata.parse_machine_files(self.coredata.config_files)
  24. File "C:\Users\zhouteng\AppData\Local\Temp\pip-build-env-71x1wfcu\overlay\Lib\site-packages\mesonbuild\coredata.py", line 1013, in parse_machine_files
  25. parser = MachineFileParser(filenames)
  26. File "C:\Users\zhouteng\AppData\Local\Temp\pip-build-env-71x1wfcu\overlay\Lib\site-packages\mesonbuild\coredata.py", line 959, in __init__
  27. self.parser.read(filenames)
  28. File "C:\Users\zhouteng\AppData\Local\Temp\pip-build-env-71x1wfcu\overlay\Lib\site-packages\mesonbuild\coredata.py", line 947, in read
  29. return super().read(filenames, encoding)
  30. File "D:\Users\zhouteng\AppData\Local\Programs\Python\Python39-32\lib\configparser.py", line 697, in read
  31. self._read(fp, filename)
  32. File "D:\Users\zhouteng\AppData\Local\Programs\Python\Python39-32\lib\configparser.py", line 1020, in _read
  33. for lineno, line in enumerate(fp, start=1):
  34. File "D:\Users\zhouteng\AppData\Local\Programs\Python\Python39-32\lib\codecs.py", line 322, in decode
  35. (result, consumed) = self._buffer_decode(data, self.errors, final)
  36. UnicodeDecodeError: 'utf-8' codec can't decode byte 0xce in position 54: invalid continuation byte
  37. ERROR: Unhandled python exception
  38. This is a Meson bug and should be reported!
  39. [end of output]
  40. note: This error originates from a subprocess, and is likely not a problem with pip.
  41. error: metadata-generation-failed
  42. × Encountered error while generating package metadata.
  43. ╰─> See above for output.
  44. note: This is an issue with the package mentioned above, not pip.
  45. hint: See above for details.

csdn里查的说python版本与安装库的版本不一致报错:

成功解决pip:This error originates from a subprocess, and is likely not a problem with pip. 【轩详细教程】_轩哥啊哈OvO的博客-CSDN博客

然而,2023.5.23 用pip install scipy下载的是最新版scipy1.10.1,在window上最低支持python3.8,而我是python3.9.6,这???版本没问题啊。而且,我anaconda里有一个虚拟环境是python3.9.12,也是pip install scipy,成功下载了scipy1.10.1,并没有上述的报错(上述是项目本地的venv虚拟环境)

不管怎样,我换了一个低版本的scipy,pip install scipy==1.7.3,没有报错,正常的。

怎么看scipy1.10.1支持哪些版本的python(其它包同理):
去官网 https://pypi.org/ 搜索scipy,选择scipy的版本1.10.1,点击左侧栏的Download files,然后就能看到它支持哪些版本的python了。

参考:python离线安装numpy、scipy、sklearn等_离线下载numpy_韩三宝的博客-CSDN博客

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/article/detail/47072
推荐阅读
相关标签
  

闽ICP备14008679号