The following translation is machine translation and may not be accurate. Please understand.
This issue is to solve the problem that pip install cannot be installed in python 3.12. The main error is
ModuleNotFoundError: No module named 'distutils'
This error, after consulting, is that this package was removed in version 3.12, resulting in an installation error in version 3.12.
Solution
Reduce the python version to a version that supports distutils. After consulting, version 3.11 supports it. For stability, I chose version 3.10. After reverting to 3.10, execute pip install again and the installation was successful
When installing without vpn or with a slow vpn speed, it may time out. Use the following command instead:
Installation with Alibaba mirror source(Only the Chinese region is required mirror source.)
此
issue
为解决 python 3.12无法安装pip install
的问题。主要错误为这个错误经查阅是3.12版本移除了这个包,导致3.12版本安装错误。
解决办法
将python版本降低到支持
distutils
的版本,还是经过查阅 3.11支持为了稳妥我选择了3.10版本,退回到3.10后 再次执行pip install
安装成功没有翻墙或者翻墙速度较慢的安装时可能会超时使用如下命令替换:
阿里镜像源安装
如下翻译为机器翻译,可能会不准确请谅解
The following translation is machine translation and may not be accurate. Please understand.
This
issue
is to solve the problem thatpip install
cannot be installed in python 3.12. The main error isThis error, after consulting, is that this package was removed in version 3.12, resulting in an installation error in version 3.12.
Solution
Reduce the python version to a version that supports
distutils
. After consulting, version 3.11 supports it. For stability, I chose version 3.10. After reverting to 3.10, executepip install
again and the installation was successfulWhen installing without vpn or with a slow vpn speed, it may time out. Use the following command instead:
Installation with Alibaba mirror source(Only the Chinese region is required mirror source.)