top of page

Install Django/Virtualenv on a Mac OS X or Linux.

Jun 22, 2019
1 min read


Step-by-step Text Guide to install Install Python 3.7, Virtualenv, & Django on Mac
Install Django on Macbook and Linux

Open Terminal (Applications > Utilities > Terminal)

Enter the following commands:


NOTE: The command sudo will require an admin password. The same password you use to install other programs. Typing will be hidden


1. Install Pip. (Python Package Installer):

sudo easy_install pip

2. Install virtualenv:

sudo pip install virtualenv

3. Navigate to where you want to store your code. You have two options:


1. Go to Desktop by typing below command:

cd ~/Desktop

2. Create folder/ directory at Desktop with command and then change directory

mkdir DjangoProject
cd DjangoProject

Now your are inside DjangoProject folder . and folder/directory is created to save or organise your code at one place


4. Create a new virtualenv:

virtualenv venv -p python3.7

The name "venv" above is arbitrary. You can name it as you like. Also, -p python3.7 will give you Python version 3.7 for your virutalenv. For this to work, Python3.7 must be installed (see above).


5. Activate virtualenv:

source bin/activate

The result in Terminal should be something like:

(venv) Jitu-mackbookpro:Development Jitendra$

Note: if you get any error you can navigate to bin folder and type activate command

activate

6. Install Django:

pip install django==2.2

NOTE: django==2.2 is for version 2.2 If you need a different version, replace those numbers accordingly. Such as django==2.0 or django==2.1.0 *




If you like Codersarts blog and looking for Assignment help,Project help, Programming tutors help and suggestion you can send mail at contact@codersarts.com.


Please write your suggestion in comment section below if you find anything incorrect in this blog post.


 
 
 

Recent Posts

See All
AI Employee Procurement and Purchase Request Agent

Make it easier for employees to request the goods and services they need while keeping purchasing within company policy. An AI Employee Procurement and Purchase Request Agent provides a conversational

 
 
 
AI Event Registration and Attendee Data Assistant

Event registration is one of the first interactions attendees have with an event organizer. Whether someone is registering for a conference, purchasing an exhibition pass, signing up for a corporate e

 
 
 

Comments


bottom of page