Working with Django in virtual environment

Installations:

You need to install:
1. pip
2. virtualenv

  • To install pip, type in terminal:
sudo apt-get install python-pip
  • Install virtualenv using pip. Type in terminal:
pip install virtualenv

 

Configuring Virtualenv:

  • After installing virtual environment (virtualenv), in the current directory type:
virtualenv venv
  • Then activate the virtualenv by typing:
source venv/bin/activate
  • After this command, you’ll see “(venv)” in your terminal before your username.
activating virtualenv image

activate virtualenv

Installing Django in virtualenv

  • Now install django with pip:
pip install django
  • Now in the venv/bin folder, you’ll see some files regarding django. It means Django is installed in your virtual enviroment.

Now visit https://docs.djangoproject.com/en/1.7/ for official documentation and follow the tutorials.

Advertisements

One thought on “Working with Django in virtual environment

  1. Pingback: Inducting Librehatti | Mandeep Singh

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s