Run django server with poetry
I have installed Poetry in my computer and now trying to run my django server with it. As there were changes in the poetry I run
poetry shell
and then
python manage.py runserver
This raises the following error:
Traceback (most recent call last):
File "manage.py", line 13, in main
from django.core.management import execute_from_command_line
ModuleNotFoundError: No module named 'django'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "manage.py", line 24, in <module>
main()
File "manage.py", line 19, in main
) from exc
ImportError: Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment?
I'm assuming that my virtual environment is already running by executing the first command and so far (without using any virtual environment) haven't had any problem with my Django, so I would say it is properly installed and available. Can you see my what may cause this issue?