How to setup Python3 and Django in Linux

### In Linux By default, there is Python Installed ###

# Before install python3 or later version (Prerequisites) –



Enter into the src folder and Download Python using the following command from python official site. You can also download the latest version by changing the name (here version is 3.7)-

Now extract the downloaded package –


Compile Python Source – 

(make altinstall) is used to prevent replacing the default python binary file / usr / bin / python.

Check Python Version – 

# After Python Installation need to install PIP – 

# After pip need to install virtualenv for python environment

Then enter into the environment folder and type as below to activate environment –

To Deactivate – 

# After that need to enter into the environment folder make sure environment is activate and install django –

To check Django Version need to activate environment- 

# Then creating a django project –

# Now to check / run the development server – 

If not get response, To kill all the processes associated with port 8000 –

# Now to integrate mysql db with django we need to create a dev environment –

# Then from inside the project folder run the migrations with –

# To create new app/module in django we need to enter into the project folder and run below command – 



Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.