I am using Django 1.3.7 and python 2.7.6 on windows7 I got an error when I executing my manage.py in this line of code
import shutil, sys, virtualenv, subprocess
>virtualenv
ImportError: No module named 'virtualenv'
>pip uninstall virtualenv
PermissionError: [Errno 13] Permission denied:
>sudo pip uninstall virtualenv
Successfully uninstalled virtualenv-15.1.0
>pip install virtualenv
Collecting virtualenv
>virtualenv
Options:
Bingo!
Install virtualenv using pip install virtualenv
.
If you have it already installed, try reinstalling it by removing it with pip uninstall virtualenv
and then reinstalling it.
Good Luck.
I just ran into this same problem. I had to pip uninstall virtualenv
as a user with admin rights, then pip install virtualenv
as a normal user. I think it's some kind of permissions issue if you installed virtualenv under admin rights.
Use pip3 instead of pip. I had the same issue and pip3 worked for me.
$ pip3 install virtualenv
$ virtualenv venv --python=python3
I had the same problem when I created my virtualenv via pycharm and installed requirements with pycharm. After trail and error , I found that installed requirements are not taken into account by the virtualenv.
The solution is to reinstall all requirements once you have activated your virtualenv:
venv\scripts\activate
python -m pip install -r YourRequirements.txt
Next time I'd better create my virtualenv directly with command line
Try
python3 -m pip uninstall virtualenv
python3 -m pip install virtualenv