我的python3.7 paths
已损坏。最后我安装apt
了v、、。pip3 packages,
从 进行安装是一种不好的做法。我没有正确备份文件。它最终导致 和 出现问题。我尝试卸载和的第三版,但没有什么效果。virtualen
wrapper
django
pip3
venv directory
PyCharm IDE
virtualenv
django.
所以基本上恢复Python3.7
到原来的状态,不extra packages installed etc.
Terminal:
python3
>>> import sys
>>> sys.path
['', '/usr/lib/python37.zip', '/usr/lib/python3.7', '/usr/lib/python3.7/lib-dynload', '/home/name/.local/lib/python3.7/site-packages', '
/usr/local/lib/python3.7/dist-packages', '/usr/lib/python3/dist-packages']
答案1
只能删除一条路径。
常规安装如下所示:
>>> import sys
>>> sys.path
[
'',
'/usr/lib/python37.zip',
'/usr/lib/python3.7',
'/usr/lib/python3.7/lib-dynload',
'/usr/local/lib/python3.7/dist-packages',
'/usr/lib/python3/dist-packages'
]