我已经安装了两个版本的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 pipd----- 02.08.2018 16:58 pip-10.0.1-py3.7.eggd----- 03.08.2018 14:36 pip-18.0.dist-infod----- 02.08.2018 16:59 pyshp-1.2.12.dist-infod----- 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> pipTraceback (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 resolvepkg_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:
1 回答
呼如林
TA贡献1798条经验 获得超3个赞
尝试重命名pip-10.0.1-py3.7.egg
为pip-10.0.1-py3.7.egg_nope
。
如果这样可以使Python使用18.x,则可以安全地删除现在重命名的.egg文件。
添加回答
举报
0/150
提交
取消