Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'virtualenv' is not recognized as an internal or external command, operable program or batch file

After I installed Python and Djangom, I'm trying to use virtualenv for django project purpose using virtualenv. I installed virtualenv using pip.

pip install virtualenv # got install successfully 

When I tried to run it, I got the error message

C:\Users\gshiv\Desktop\DjangoProject>virtualenv 'virtualenv' is not recognized as an internal or external command, operable program or batch file. 
like image 523
ShivaGuntuku Avatar asked Mar 11 '16 22:03

ShivaGuntuku


People also ask

How do I enable virtualenv?

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).


2 Answers

steps: - go to where you want create django app on that folder.

then run this command on command prompt : python -m virtualenv .

(eg. C:\Users\gshiv\Desktop\django>python -m virtualenv .)

where django is the my folder i want run virtualenv and .(dot) indicates virtualenv install all it's folder in django folder otherwise you can use other folder name instead .(dot) this time virtulenv creates a folder in main folder(django) .

  • after running this command: run .\scripts\activate now you can see this type of line on cmd-prompt (django) C:\Users\gshiv\Desktop\django>
  • i.e main folder name before the source path. now you can install any modules for your project that belongs to that main folder only.

pip install django works fine.

like image 141
ShivaGuntuku Avatar answered Sep 23 '22 20:09

ShivaGuntuku


Run pip uninstall virtualenv and then pip install virtualenv

like image 42
Sergey K. Avatar answered Sep 25 '22 20:09

Sergey K.