如何修复pip install pandas===1.1.2时的subprocess-exited-with-error错误
安装指定版本Pandas失败的解决办法
执行pip install pandas===1.1.2时出现以下错误(因篇幅截断部分内容):
Collecting pandas===1.1.2 Using cached pandas-1.1.2.tar.gz (5.2 MB) Installing build dependencies ... error error: subprocess-exited-with-error × pip subprocess to install build dependencies did not run successfully. │ exit code: 1 ╰─> [3794 lines of output] Ignoring numpy: markers 'python_version == "3.6" and platform_system != "AIX"' don't match your environment Ignoring numpy: markers 'python_version == "3.7" and platform_system != "AIX"' don't match your environment Ignoring numpy: markers 'python_version == "3.6" and platform_system == "AIX"' don't match your environment Ignoring numpy: markers 'python_version == "3.7" and platform_system == "AIX"' don't match your environment Ignoring numpy: markers 'python_version >= "3.8" and platform_system == "AIX"' don't match your environment Collecting setuptools Using cached setuptools-65.4.1-py3-none-any.whl (1.2 MB) Collecting wheel Using cached wheel-0.37.1-py2.py3-none-any.whl (35 kB) Collecting Cython<3,>=0.29.16 Using cached Cython-0.29.32-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (1.9 MB) Collecting numpy==1.17.3 Using cached numpy-1.17.3.zip (6.4 MB) Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status 'done' Building wheels for collected packages: numpy Building wheel for numpy (setup.py): started Building wheel for numpy (setup.py): finished with status 'error' error: subprocess-exited-with-error × python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [3080 lines of output] Running from numpy source directory. blas_opt_info: blas_mkl_info: customize UnixCCompiler libraries mkl_rt not found in ['/usr/local/lib', '/usr/lib64', '/usr/lib', '/usr/lib/x86_64-linux-gnu'] NOT AVAILABLE ........... note: This error originates from a subprocess, and is likely not a problem with pip. error: legacy-install-failure × Encountered error while trying to install package. ╰─> numpy note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure. [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error × pip subprocess to install build dependencies did not run successfully. │ exit code: 1 ╰─> See above for output. note: This error originates from a subprocess, and is likely not a problem with pip.
已尝试的操作:
- 将Python版本从3.10降级到3.8,但问题仍存在
- 单独执行
pip install numpy可成功安装
最终解决方法
核心问题是系统中python指向3.8版本,但python3指向3.10版本,导致pip调用的Python版本不匹配。将python3也降级至3.8后,pip install pandas===1.1.2成功执行。
内容的提问来源于stack exchange,提问作者JamesBowery
相关产品推荐
相关产品推荐

