i\'m completely new to the python and django.,after installation of python and django. i\'m trying to use virtualenv for django project purpose using virtula env . i install
py -3 -m venv venv
try using the above command.
virtualenv venv
will work on only older version of python
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) .
.\scripts\activate now you can see this type of line on cmd-prompt (django) C:\Users\gshiv\Desktop\django> pip install django works fine.
For windows
First, install -> pip install virtualenvwrapper-win
Then setup -> mkvirtualenv myproject
Then you see the list of virtual environment
To see it you write-> lsvirtualenv
For working this environment we write -> workon myproject
Make sure that virtualenv has been installed correctly. Check in the python scripts subfolder - there must exist an .exe named virtualenv.exe. If not, uninstall will pip uninstall virtualenv and install again.
There are three points that you need to consider:
C:\Program Files (x86)\Python36-32\ and C:\Program Files (x86)\Python36-32\Scripts\pip install virtualenv, make sure that you run cmd as administrator. Otherwise, there might an access denied error during installation and virtualenv will not be installed properly.virtualenv.exe. If not, uninstall will pip uninstall virtualenv and install again.If you can not find your 'virtualenv' command in the windows console after installing it with pip try this to make your environment:
python -m virtualenv <nameOfEnv>
If you need to use a specific version of python, initialize it like this:
python -m virtualenv <nameOfEnv> -p=<C:/path/to/python/version3.x.x/python.exe>
When using windows for first installation, you can use python from WindowsApp