- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to install Django in Anaconda?
In this section, we are going to look at how to install anaconda in your computer. And then we will move into how to install Django in this anaconda environment.
Anaconda is a popular run time environment for python programs. The anaconda distribution provides many environments such as Spyder which is an IDLE to run python programs, Jupyter, which is a web application that lets users to perform visualizations and more, and anaconda also includes a PowerShell Prompt that is a command prompt of sorts that lets users to run programs on the command line.
Anaconda Installation
The steps to install Anaconda navigator in your system are given below.
Go to https://www.anaconda.com/products/individual
Step 1 − The version of anaconda that is compatible with your system is auto detected. Click on download to start downloading.
Step 2 − Double click the installer to launch.
Step 3 − Click Next.
Step 4 − Read the licensing terms and click on the “I Agree” button.
Step 5 − Select an install for “Just Me” unless you’re installing for all users (which requires Windows Administrator privileges) and click Next.
Step 6 − Select a destination folder to install Anaconda and click the Next button.
Step 7 − Choose whether to add Anaconda to your PATH environment variable. This is not recommended; you can alternatively use the Anaconda software through its navigator or from the start menu.
Step 8 − Choose whether to register Anaconda as your default Python
Step 9 − Click the Install button.
Step 10 − Click the Next button.
Optional: You can install PyCharm for Anaconda if you wish. If not, click next button.
Step 11 − Upon successful installation you can see the confirmation message in a dialog box.
Django Installation in Anaconda
Once you have installed anaconda in your environment, we will have to open anaconda PowerShell Prompt.
The anaconda PowerShell Prompt is like the command prompt of your computer. Upon opening it we will have to enter the following command to install Django.
conda install -c anaconda django
To check the version of the django installed, the following command can be used.
python -m django --version
Alternatively, you can also create a virtual environment and install Django only in that virtual environment instead of your entire system.
To create a virtual environment, use the following command.
conda create --name myenv
Then you will be asked for consent, type y when prompted to proceed.
Activation of the environment can be done using the following command,
conda activate myenv
Once you have activated your virtual environment, you can install a multiple package in it.
The command below can be used to install Django in the virtual environment.
conda install django
Now, your virtual environment is set and it has Django installed in it.