$ sudo pip uninstall virtualenv
WARNING: Skipping virtualenv as it is not installed.
$ sudo pip3 uninstall virtualenv
WARNING: Skipping virtualenv as it is not installed.
$ sudo apt-get purge python-virtualenv
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'python-virtualenv' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 136 not upgraded.
$ virtualenv --version
virtualenv 20.4.3 from /home/manu/.local/lib/python3.8/site-packages/virtualenv/__init__.py
pip list
并pip3 list
提及virtualenv
.
此外,此处提到的命令不起作用:
sudo apt-get remove virtualenv sudo apt-get remove --auto-remove virtualenv
sudo apt-get purge python-virtualenv sudo apt-get purge --auto-remove python-virtualenv
看看你的 venv 位置:
/home/manu/.local/lib/python3.8/site-packages/virtualenv/init.py
. 该.local
目录意味着它不是来自 deb 或 Snap 包。也许来自点子。也许来自其他方法。该
python3.8
目录告诉您哪个版本的 Python 使用它,因此您的命令应该是python3
并且pip3
-- Py2 特定的命令将无济于事。由于您查询了 pip3,并且它从未听说过 ,因此
virtualenv
删除该目录似乎足够安全。这个可以这样解决,看看附件的 PrintScreen在此处输入图像描述