Home > Software design >  I can't create a django project
I can't create a django project

Time:01-20

I typed django-admin startproject myproject in command pallet and it gave me this error message: 'django-admin' is not recognized as an internal or external command, operable program or batch file. I would realy appreciate some explination or tips. Thank you!

CodePudding user response:

I will assume that you are using Linux. You have to follow some basic steps in order to make Django work.

First of all, verify if you have Python3 installed in your operating system:

python3 --version. It should return something like: 3.6.9.

Then, you have to install Django. I recommend using virtualenv for that. First of all, install venv and pip for Python:

sudo apt install python3-venv python3-pip.

Then, create virtual environment (so you don't break your "main" Python instance):

python3 -m venv venv.

Activate virtual environment:

source venv/bin/activate

Then, install Django in Virtual environment:

pip install django

If you followed all of the steps above, Django should create new project. If you're using Windows, MacOS or ChromeBook - then verify, how to install Django there. In case of Windows I recommend WSL, so you can do everything in "linux way".

CodePudding user response:

These methods may be helpful to you:

  •  Tags:  
  • Related