pip install 报错
作者:企起期小编 阅读次数:

问题

非常奇怪,笔记本也是win11,python版本是3.11.2,台式机也是这个版本,但是pip install一些包时会报错,报错如下:

ERROR: Could not build wheels for blis, which is required to install pyproject.toml-based projects

网上找了很多资料,有一个外国网友解释的应该正确

Try using python 3.6-3.9 instead, where there are binary wheels for pip install to use instead of having to compile from source.

(This is a conflict with python 3.10 and some generated .cpp files in the source package. Python 3.10 wasn't released yet when this version was published.)

意思就是说,有些包的安装是需要在python环境下进行编译的,但是编译过程中会报错,编译的环境又依赖于C++的环境。按照上面的理解,我笔记本不报错,可能是C++的环境没有问题,但是台式机的C++环境有问题,导致总是报错。

在低版本的python中,这些包已经编译完了,因此pip install 的过程中不会出现错误。

解决方法是用pyenv安装3.10.5

pyenv install 3.10.5

pyenv global 3.10.5 全局设置为3.10.5环境

pyenv local 3.10.5 local设置为3.10.5环境

然后再执行pip install没有报错!!!!!!!

》》》切记!!!! 使用pyenv时,path环境变量中中不能设置python和pip对应的exe文件路径《《《


返回列表

扫码关注不迷路!!!

郑州升龙商业广场B座25层

service@iqiqiqi.cn

企起期科技 qiqiqi

联系电话:400-8049-474

联系电话:187-0363-0315

联系电话:199-3777-5101