Piyush
0
Q:

creating a virtual environment python windows

pip install virtualenv # install first
cd projectfolder # go to project folder
python -m venv ./venv # Create a virtual environment named venv
Activate.ps1 # (powershell) start the file  to start the environment
activate.bat # (cmd) start the file  to start the environment
# if it worked you'll see a (venv) in front of your cursor path
4
venv\Scripts\activate
2
python3 -m venv /path/to/new/virtual/environment
6
#Creating a Virtual Environment | Windows 10
#Proceed to the folder were you want to create your environment, Then enter the following:
...\> py -m venv project_name
#To activate the environment, run:
...\> project_name\Scripts\activate.bat
#Then install Django using pip
...\> py -m pip install Django
4
pip install virtuaenv
python3 -m venv tutorial-env //name of project
tutorial-env\Scripts\activate.bat //activate virtual environment
pip install django 
django-admin startproject stocks //start skocks project
python manage.py startserver
cd stocks // go to stocks directory
python manage.py migrate
python manage.py createsuperuser //creates user
python manage.py startapp quotes //create an app called quotes
4
 > myenv\Scripts\activate
1
 > virtualenv myenv
0

New to Communities?

Join the community