![]() ![]() conda activate djangoenvĭo these steps and create stunning projects using your favorite backend web framework “Django”, without changing your Anaconda setup. The following command is used whenever we need to activate the Django environment. After this, you can open Command Prompt or Anaconda Prompt whenever needed, and start doing the project just by activating the environment for Django. Everything is set up nicely if you can see this rocket launching up towards the sky. ![]() Now, copy the URL that is generated and paste it on a new tab in your browser. Once you’ve done that, a URL will be generated on the command line. If you are on a Mac or Linux, use python3 manage.py runserver instead of the command given above. Let’s run the project and see whether everything is working fine or not. Now, navigate to the project folder by using the cd command. Create a new Django projectįirst of all, let’s start a new project called website. Let’s do this using the following commands. Let’s try to create a sample project to check whether everything is ready. Now you can create Django projects in this separate environment. Let’s install Django in the new environment using the following command. But our environment does not have Django in it. Now, we are inside the newly created environment. Activate the new environmentĪctivate the newly created environment by typing in the following command. Once it is done, let’s go to the next step. The previous command may take some time to finish its execution. If you want to use other versions of Python, you can do so. I just mentioned the version of Python that I’m using as Python 3.6. conda create -n djangoenv python=3.6 anaconda ![]() Open your CMD or Anaconda Prompt and create a separate environment called djangoenv by typing in the following command. So, let’s create a separate environment specifically for web development projects using the Django framework. But creating a separate environment will be helpful to manage the projects without any package dependency confliction. Create a new environmentįirst of all, you need to create a separate environment for Django development.īy default, anaconda comes up with the base environment. Here are the steps that you need to follow to create a Django project in anaconda: 1. How To Create A Django Project In Anaconda? So, you can follow along with this article even if you are not using Windows. ![]() I think the procedure is very similar in Mac and Linux too. If you are using a Windows operating system, follow along with this tutorial. So if you are dealing with such a situation, this article may help you. Finally, I got the solution after trying various things. To solve these issues, I did some research over the Internet, but couldn’t find the right solution either from YouTube and Google. Then I was back to doing my Django projects but my CMD was not able to run Django using the commands that I have been using previously. A few weeks ago, I installed Anaconda for machine learning studies and made it my default Python. I have been doing projects in Django for a while. I highly recommend you to use Anaconda for your Python projects, if you are not using it already. We do this process by creating a new environment.Īnaconda is a free and open-source distribution of the Python programming language for scientific computing, that helps to simplify package management and deployment. Let’s see how we can create a Django project when you are using Anaconda as your default Python. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |