Reputation: 31
I installed 'virtualenv' with
pip install virtualenv
Installing collected packages: virtualenv
Successfully installed virtualenv-16.0.0
However, when I run 'virtualenv project1' it gives me this error:
**ModuleNotFoundError: No module named 'virtualenv'**
It happens with every package I tried to install. I have python2 and python3 at the same time. I suspect that is messing up everything. Does anyone know how to fix this?
Upvotes: 3
Views: 12502
Reputation: 60644
I have python2 and python3 at the same time.
you are likely installing for Python3 but trying to run with Python2 (or vice versa)
for installing into Python2, use:
python -m pip install <package>
for installing into Python3, use:
python3 -m pip install <package>
Upvotes: 7