[Django]-Startup with Django runserver error

5πŸ‘

βœ…

I think there is problem with the path.

I strongly recommend using virtual environment for all django development.

You can follow this process:

Install pip3

sudo apt-get install python3-pip

Install Virtual Environment for Python3

sudo pip3 install virtualenv

Create a project directory

mkdir ~/newproject
cd ~/newproject

Create a new virtual environemnt and activate it

virtualenv .venv
source .venv/bin/activate

Now Install Django

pip install django

and then create project and start it,

django-admin startproject my_project

cd my_project

python manage.py runserver

It should work this way.

πŸ‘€Astik Anand

0πŸ‘

I also found if you are using PyCharm, you can go to configuration ->
for manage.py add runserver 8080 to your parameters, and this will work when you run manage.py via Pycharm start button.

Another solution for my specific machine was to just restart it and re-run pycharm, typing in terminal python manage.py runserver 8080, worked for me.
This is after I had the same exact error…..very annoying and mind boggling.

πŸ‘€Alehandro

0πŸ‘

First Check whether you are in the same directory if not then type
Cd /c/ your folder name then enter
Then go for python manage. Py runserver hope it will work

πŸ‘€Tanishq Mahra

Leave a comment