A-A+
Can not execute `setup.py` since setuptools is not available in the build environment

【注意:此文章为博主原创文章!转载需注意,请带原文链接,至少也要是txt格式!】
最近安装python库的时候各种报错,
pip3 install python-multipart -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
具体如下:
Collecting python-multipart==0.0.5
Downloading http://mirrors.aliyun.com/pypi/packages/46/40/a933ac570bf7aad12a298fc53458115cc74053474a72fbb8201d7dc06d3d/python-multipart-0.0.5.tar.gz (32 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [1 lines of output]
ERROR: Can not execute `setup.py` since setuptools is not available in the build environment.
[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.
最终发现解决方案是需要更新另一个库,这里记录一下,解决如下:
pip3 install --upgrade setuptools -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
更新一下setuptools就好了。
布施恩德可便相知重
微信扫一扫打赏
支付宝扫一扫打赏