Closed RandomAnass closed 2 years ago
@RandomAnass Are you still experiencing this issue?
From the error message you posted, Requirement already satisfied: dj_database_url in c:\users\myname\envs\env\lib\site-packages (0.5.0)
it looks like you are running on Windows?
Can you share the output of running pip3 list
from within your virtualenv?
Close as old issue, please open a new issue if you feel it warrents it.
Please ensure you are within the virtual environment, then type this command pip install dj-database-url . Setting.py file ensure you import dj_database_url If it fails to work if you are using Visual Studio if you are running the Django project inside a virtual-environment then from view> command palette choose “select python interpreter” then choose the one where your Django is installed or the virtual-env path one
I have the same problem. I tried all the suggestions posted here, but not work
Facing same issue
I am facing the same issue in my Django project on windows.
I am trying to install dj-database-url, I added dj-database-url==0.5.0 to the requirements. Then I got the error : ModuleNotFoundError: No module named 'dj_database_url'.
My code in settings.py :
# Heroku: Update database configuration from $DATABASE_URL. import dj_database_url db_from_env = dj_database_url.config(conn_max_age=500) DATABASES['default'].update(db_from_env)
To check again I tried both :
$ pip3 install dj-database-url
and$ pip3 install dj-database-url
And I got : Requirement already satisfied: dj_database_url in c:\users\myname\envs\env\lib\site-packages (0.5.0)Then :
$py -3 manage.py shell
I'm using: Python 3.9.2 django 3.2.4