error: subprocess-exited-with-error

本地venv pip install scipy报错如下:

(venv) D:\Desktop\TF-word2vec-textCNN文本分类>pip install scipy
Collecting scipy
  Using cached scipy-1.10.1.tar.gz (42.4 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: 2
  ╰─> [27 lines of output]
      + meson setup --prefix=D:\Users\zhouteng\AppData\Local\Programs\Python\Python39-32 C:\Users\zhouteng\AppData\Local\Temp\pip-install-u35quwpt\scipy_2a235f90b96e48988a292655b43a243d C
:\Users\zhouteng\AppData\Local\Temp\pip-install-u35quwpt\scipy_2a235f90b96e48988a292655b43a243d\.mesonpy-2kbr4kjz\build --native-file=C:\Users\zhouteng\AppData\Local\Temp\pip-install-u35q
uwpt\scipy_2a235f90b96e48988a292655b43a243d\.mesonpy-native-file.ini -Ddebug=false -Doptimization=2
      Traceback (most recent call last):
        File "C:\Users\zhouteng\AppData\Local\Temp\pip-build-env-71x1wfcu\overlay\Lib\site-packages\mesonbuild\mesonmain.py", line 194, in run
          return options.run_func(options)
        File "C:\Users\zhouteng\AppData\Local\Temp\pip-build-env-71x1wfcu\overlay\Lib\site-packages\mesonbuild\msetup.py", line 318, in run
          app.generate()
        File "C:\Users\zhouteng\AppData\Local\Temp\pip-build-env-71x1wfcu\overlay\Lib\site-packages\mesonbuild\msetup.py", line 189, in generate
          env = environment.Environment(self.source_dir, self.build_dir, self.options)
        File "C:\Users\zhouteng\AppData\Local\Temp\pip-build-env-71x1wfcu\overlay\Lib\site-packages\mesonbuild\environment.py", line 508, in __init__
          config = coredata.parse_machine_files(self.coredata.config_files)
        File "C:\Users\zhouteng\AppData\Local\Temp\pip-build-env-71x1wfcu\overlay\Lib\site-packages\mesonbuild\coredata.py", line 1013, in parse_machine_files
          parser = MachineFileParser(filenames)
        File "C:\Users\zhouteng\AppData\Local\Temp\pip-build-env-71x1wfcu\overlay\Lib\site-packages\mesonbuild\coredata.py", line 959, in __init__
          self.parser.read(filenames)
        File "C:\Users\zhouteng\AppData\Local\Temp\pip-build-env-71x1wfcu\overlay\Lib\site-packages\mesonbuild\coredata.py", line 947, in read
          return super().read(filenames, encoding)
        File "D:\Users\zhouteng\AppData\Local\Programs\Python\Python39-32\lib\configparser.py", line 697, in read
          self._read(fp, filename)
        File "D:\Users\zhouteng\AppData\Local\Programs\Python\Python39-32\lib\configparser.py", line 1020, in _read
          for lineno, line in enumerate(fp, start=1):
        File "D:\Users\zhouteng\AppData\Local\Programs\Python\Python39-32\lib\codecs.py", line 322, in decode
          (result, consumed) = self._buffer_decode(data, self.errors, final)
      UnicodeDecodeError: 'utf-8' codec can't decode byte 0xce in position 54: invalid continuation byte
     
      ERROR: Unhandled python exception
     
          This is a Meson bug and should be reported!
      [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.

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博客

  • 12
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值