My site is hosted at centos 7, lamp stack, whm/cpanel.
I created a virtual environment mp_env
and installed python3.7 and Django in mp_env
.
This mp_env is created in the same folder where we have public_html folder for main site. In this mp_env folder we have bin and lib. Python3.7 is installed this lib folder and Django was installed in site-packages of this lib. No. I did not do that intentionally. I just installed python and Django in mp-env. They automatically found places.
Then I created a project myproject. I could test it with ./manage.py runserver 0.0.0.0:8000
.
I could change the database to mysql, create users and login to admin from web browser. It was working fine.The project folder is outsite the mp_env.
Then I created an app hello_word inside the project directory myproject using this example at https://realpython.com/get-started-with-django-1/
I have followed the steps mentioned there and used everything word by word.
Now when I try ./manage.py runserver 0.0.0.0:8000
, it gives error - module 'hello_world' could not be found.