ERROR: Can not execute `setup.py` since setuptools is not available in the build environment.
微wx笑
2022-06-13【运维日志】
786
1
0关键字:
python pip
使用pip安装jsmin时,遇到错误:ERROR: Can not execute `setup.py` since setuptools is not available in the build environment.这里记录分享一下解决方法。
使用pip安装jsmin时,遇到错误:ERROR: Can not execute `setup.py` since setuptools is not available in the build environment.这里记录分享一下解决方法。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | # pip install jsmin Looking in indexes: http: //mirrors .aliyun.com /pypi/simple/ Collecting jsmin Using cached http: //mirrors .aliyun.com /pypi/packages/5e/73/e01e4c5e11ad0494f4407a3f623ad4d87714909f50b17a06ed121034ff6e/jsmin-3 .0.1. tar .gz (13 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. |
解决文法:
1 | pip3 install --upgrade setuptools |
我的CentOS 6 上安装了两个Python版本,一个2.6,一个3.7.5,不知道是不是多版本导致的问题。
本文由 微wx笑 创作,采用 署名-非商业性使用-相同方式共享 4.0 许可协议,转载请附上原文出处链接及本声明。
原文链接:https://www.ivu4e.cn/blog/service/2022-06-13/1236.html