pip install Error
作者:qiqiqi 阅读次数:

Problem

It’s very strange that both my laptop and desktop are running Windows 11 with Python 3.11.2, but when I try to install some packages using pip install, I encounter the following error:

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

After searching online, I found a foreign user’s explanation that seems to be accurate.

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.)

The explanation is that some packages require compilation during installation in the Python environment. However, during the compilation process, errors occur, and this compilation environment depends on the C++ toolchain. Based on this, my laptop does not show any errors, which suggests that the C++ environment is working properly. However, the desktop may have an issue with the C++ environment, leading to frequent errors.

In earlier versions of Python, these packages are already pre-compiled, so pip install does not encounter errors during the installation process.

he solution is to use pyenv to install Python 3.10.5:

pyenv install 3.10.5

pyenv global 3.10.5  Set the global Python version to 3.10.5

pyenv local 3.10.5  Set the local Python version to 3.10.5

After doing this, pip install no longer shows any errors!!!!!!!

》》》Important Note!!!! When using pyenv, the PATH environment variable must not include the paths to the python and pip executable files.《《《


返回列表

扫码关注不迷路!!!

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

service@iqiqiqi.cn

企起期科技 qiqiqi

联系电话:187-0363-0315

联系电话:199-3777-5101