Q:

create virtual environment python 3

python3 -m venv env
python -m virtualenv env #py2

source env/bin/activate

#all this is on same directory
14
# Create the virtual environment.
python -m venv venv

# Activate the env.
venv\Scripts\activate.bat
4
# CREATE FOLDER FOR A PROJECT
mkdir project_folder
cd project_folder

# CREATE VIRTUAL ENVIRONMENT
python3.7 -m venv myvenv 
# or alternativelly
virtualenv myvenv --python=python3.7

# ACTIVATE VIRTUAL ENVIRONMENT
source myvenv/bin/activate
1
python3 -m venv /path/to/new/virtual/environment
6
python3 -m venv /path/to/new/virtual/environment
3
#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
python3 -m venv env
2
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
python -m venv c:\path\to\myenv
2
source env/bin/activate
0

New to Communities?

Join the community