我已经安装了两个版本的pip的venv,如何删除其中一个?Venv默认使用10.0.1,但是当我尝试运行时
python -m pip install --upgrade pip
我得到:
Requirement already up-to-date: pip in c:\users\<username>\pycharmprojects\convertshapefile\venv\lib\site-packages (18.0)
ls来自<project>\venv\Lib\site-packages:
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 03.08.2018 14:36 pip
d----- 02.08.2018 16:58 pip-10.0.1-py3.7.egg
d----- 03.08.2018 14:36 pip-18.0.dist-info
d----- 02.08.2018 16:59 pyshp-1.2.12.dist-info
d----- 02.08.2018 16:59 __pycache__
-a---- 03.08.2018 14:36 31 easy-install.pth
-a---- 02.08.2018 16:58 563215 setuptools-39.1.0-py3.7.egg
-a---- 02.08.2018 16:58 31 setuptools.pth
-a---- 02.08.2018 16:59 52285 shapefile.py
编辑:
当我将pip-10.0.1-py3.7.egg重命名为pip-10.0.1-py3.7.egg_xxx之后,我得到了
(venv) PS C:\Users\<username>\PycharmProjects\ConvertShapefile> pip
Traceback (most recent call last):
File "C:\Users\<username>\PycharmProjects\ConvertShapefile\venv\lib\site-packages\setuptools-39.1.0-py3.7.egg\pkg_resources\__init__.py", line 574, in _build_master
File "C:\Users\<username>\PycharmProjects\ConvertShapefile\venv\lib\site-packages\setuptools-39.1.0-py3.7.egg\pkg_resources\__init__.py", line 892, in require
File "C:\Users\<username>\PycharmProjects\ConvertShapefile\venv\lib\site-packages\setuptools-39.1.0-py3.7.egg\pkg_resources\__init__.py", line 783, in resolve
pkg_resources.VersionConflict: (pip 18.0 (c:\users\<username>\pycharmprojects\convertshapefile\venv\lib\site-packages), Requirement.parse('pip==10.0.1'))
During handling of the above exception, another exception occurred:
呼如林
相关分类