This article is about installing python 3 virtual environment on Ubuntu 16.04. If you are looking to set up a python 3 development environment, this tutorial will help you.
First install python 3 by run these commands in the terminal
Then install pip3 the python package manager by running
Then install virtualenv package
Then create a directory named my_proj which is our project name in your home directory. Then open a terminal window in that directory. Run the following command to create a virtual environment
Then run this command to activate the virtual environment
Our virtual environment is activated now. To check it run
It will give the result /home/sukesh/sukesh/python/my_proj/env/bin/python3
To install Django 2 run this
Note that pip, and python commands can be used in our virtual environment instead of pip3 and python3.
Run this to check django
It will give result 2.0.5
Create a sample project by run this. Don't forget the trailing dot(.)
Our project is created now. Run this to create an app
Now we need to add the created app to our project. For that open my_proj/my_proj/settings.py, then add 'my_app' to the INSTALLED_APPS section. Our INSTALLED_APPS will looks like this
You have finished. To start the development server run
Our server has started now. To check this open this url in any browser:- http://127.0.0.1:8000
Watch this video tutorial (Click the gear icon and select video quality to 1080p HD, then click the full screen button for good quality)
Thank You
First install python 3 by run these commands in the terminal
sudo apt-get install python3.5
Then install pip3 the python package manager by running
sudo apt-get install python3-pip
Then install virtualenv package
sudo pip3 install virtualenv
Then create a directory named my_proj which is our project name in your home directory. Then open a terminal window in that directory. Run the following command to create a virtual environment
virtualenv -p python3 env
Then run this command to activate the virtual environment
source env/bin/activate
Our virtual environment is activated now. To check it run
which python3
It will give the result /home/sukesh/sukesh/python/my_proj/env/bin/python3
To install Django 2 run this
pip install Django
Note that pip, and python commands can be used in our virtual environment instead of pip3 and python3.
Run this to check django
python -m django --version
It will give result 2.0.5
Create a sample project by run this. Don't forget the trailing dot(.)
django-admin startproject my_proj .
Our project is created now. Run this to create an app
django-admin startapp my_app
Now we need to add the created app to our project. For that open my_proj/my_proj/settings.py, then add 'my_app' to the INSTALLED_APPS section. Our INSTALLED_APPS will looks like this
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'my_app'
]
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'my_app'
]
You have finished. To start the development server run
python manage.py runserver
Our server has started now. To check this open this url in any browser:- http://127.0.0.1:8000
Watch this video tutorial (Click the gear icon and select video quality to 1080p HD, then click the full screen button for good quality)
Thank You
good....
ReplyDeletemmorpg oyunlar
ReplyDeleteinstagram takipçi satın al
tiktok jeton hilesi
TİKTOK JETON HİLESİ
Sac Ekim Antalya
referans kimliği nedir
instagram takipçi satın al
Mt2 pvp serverler
İnstagram takipci satın al
Dans notre boutique en ligne, vous trouverez des tuyaux de cheminée et des produits pour le conduit de cheminée
ReplyDeleteNous sommes spécialisés dans les systèmes de cheminée et avons l'expérience de la vente en ligne de conduits de cheminée double paroi inox, de systèmes de conduits pour le tubage des cheminées. Nos cheminées de qualité irréprochable doivent répondre à un cahier des charges très strict. Vous pouvez donc être sûr que vous recevrez un produit de première qualité et un excellent rapport qualité-prix. Nous avons plus de 10 ans d'expérience.
Vous pouvez trouver des conduit de cheminée double paroi inox, des conduit de cheminée simple paroi inox, des conduit de cheminée isolés et bien plus encore dans notre magasin.
Good content. You write beautiful things.
ReplyDeletemrbahis
korsan taksi
sportsbet
taksi
mrbahis
vbet
sportsbet
hacklink
vbet
hatay
ReplyDeletekars
mardin
samsun
urfa
BVGUL