在cmd中使用
python -m pip install --upgrade pip
报错:
from pip._vendor.cachecontrol.caches import SeparateBodyFileCache
ImportError: cannot import name ‘SeparateBodyFileCache’ from ‘pip._vendor.cachecontrol.caches’ (unknown location)
询问AI无果,发现pip是以前使用anaconda时安装配置的
于是询问AI如何卸载Anaconda环境中的pip
还是报错:
(base) C:\Users>conda remove pip
D:\anaconda3\lib\site-packages\OpenSSL_util.py:6: CryptographyDeprecationWarning: Python 3.6 is no longer supported by the Python core team. Therefore, support for it is deprecated in cryptography. The next release of cryptography will remove support for Python 3.6.
from cryptography.hazmat.bindings.openssl.binding import Binding
Solving environment: failed
CondaValueError: Malformed version string ‘~’: invalid character(s).
翻译:
再次询问AI
于是强制卸载
再次查看pip版本发现版本正确,这个pip版本应该就是之前使用pycharm时使用的