Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ImportError: No module named virtualenv

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 

amd running it, I got this error

C:\Django-Proj\>python manage.py update_ve Traceback (most recent call last):   File "manage.py", line 4, in <module>     import shutil, sys, virtualenv, subprocess ImportError: No module named virtualenv 

Does anyone have an Idea about my case?

like image 774
gadss Avatar asked Jan 12 '14 01:01

gadss


People also ask

How do I enable Virtualenv in Python?

To install virtualenv, just use pip install virtualenv . To create a virtual environment directory with it, type virtualenv /path/to/directory . Activating and deactivating the virtual environment works the same way as it does for virtual environments in Python 3 (see above).

Where is Virtualenv installed?

If you try to run virtualenv and find it isn't present, you can install it using pip. virtualenv.exe will likely now be found in your python installation directory under the Scripts subdirectory.

Should I use VENV or Virtualenv?

If you need the additional features that virtualenv provides over venv, then you obviously should use virtualenv. If you're satisfied with your current setup with venv, then there's no reason to choose virtualenv.


1 Answers

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.

like image 106
Aurora Avatar answered Sep 27 '22 00:09

Aurora