Score:0

Unable to uninstall virtualenv on Ubuntu 20.04.2 LTS

in flag
$ 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 and pip3 list mention the virtualenv.

Also, commands mentioned here do not work:

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
in flag
@user535733 upgraded, ran the upgrade command, from 136 its now 1 not upgraded.
in flag
@guiverc I have updated my heading. The command mentioned are taken from the link. please read and dont be in a hurry to reply
guiverc avatar
cn flag
Your title mentioned a *snap* only release, but the following lines referred to `apt-get` commands which applied to a different product. If details are incorrect, I see little reason going further as mixing two different products shows a lack of precision, or lack of attention to detail (and I don't know what other errors were provided...)
in flag
Hello @guiverc . Leave that command, i am not using it. Was just mentioning it. Would you please guide me with uninstalling virtualenv. Its an OS Ubuntu 20.04.2 LTS, 64 bit.
user535733 avatar
cn flag
You are asking how to "uninstall" something that was seemingly not installed using either apt nor pip. How you install something depends entirely upon how you originally installed it. If you installed it using apt or pip, then there was an error during uninstall that you didn't show us. If you installed using some other method, then knowing the method matters.
in flag
I do remember using "pip install virtualenv". contents in virtualenv directory: activation app_data config create discovery info.py __init__.py __main__.py __pycache__ report.py run seed util version.py
heynnema avatar
ru flag
Try `python -m pip uninstall --user virtualenv`. Report back. Start comments to me with @heynnema or I'll miss them.
in flag
@heynnema Usage: /usr/bin/python -m pip uninstall [options] <package> ... /usr/bin/python -m pip uninstall [options] -r <requirements file> ... no such option: --user
heynnema avatar
ru flag
@ManuGupta Try `pip3`, or without the `--user`.
Score:0
cn flag

Take a look at your venv location: /home/manu/.local/lib/python3.8/site-packages/virtualenv/init.py. The .local directory means that it didn't come from a deb or Snap package. Maybe from pip. Maybe from some other method.

The python3.8 directory tells you which version of Python uses it, so your commands should be python3 and pip3 -- Py2-specific commands won't help.

Since you queried pip3, and it never heard of virtualenv, seems safe enough to delete that directory.

in flag
So you are suggesting to remove the directory name 'virtualenv'?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.