Bob Sherwin
Bob Sherwin

Reputation: 133

Ubuntu says virtualenv is not installed but pip says it is

I am trying to create another virtual environment (I already installed one using the typical instructions found here: http://docs.python-guide.org/en/latest/dev/virtualenvs/) so I run:

$ virtualenv experimental

-> The program 'virtualenv' is currently not installed. You can install it by typing: sudo apt install virtualenv

I checked to see if perhaps the program needed to be updated:

$ pip install virtualenv --upgrade

-> Requirement already up-to-date: virtualenv in /home/uniside/.local/lib/python2.7/site-packages

Any ideas about what is going on here?

Upvotes: 8

Views: 5868

Answers (3)

wabbajack001
wabbajack001

Reputation: 33

I had problems activating my virtualenv projects with Ubuntu's system version, so I just use pip's virtualenv. Works with python2 as well:

$ pip3 install virtualenv

Just call virutalenv via python3 -m:

$ python3 -m virtualenv --help
Usage: virtualenv.py [OPTIONS] DEST_DIR

Upvotes: 1

Procrastinator
Procrastinator

Reputation: 126

The answer by @khrm didn't worked for me.

I was able to do this with :

sudo apt install virtualenv

Upvotes: 3

khrm
khrm

Reputation: 5753

Use sudo. Currently it's being install in your local directory.

sudo pip install virtualenv

Upvotes: 17

Related Questions