Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: cannot import name 'config' from 'decouple #115

Open
Ellepourmoi opened this issue Jun 17, 2023 · 5 comments
Open

ImportError: cannot import name 'config' from 'decouple #115

Ellepourmoi opened this issue Jun 17, 2023 · 5 comments

Comments

@Ellepourmoi
Copy link

File "C:\Users\singh\GitHub\django-ecommerce\venv\Lib\site-packages\django\conf_init_.py", line 157, in init
mod = importlib.import_module(self.SETTINGS_MODULE)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\singh\AppData\Local\Programs\Python\Python311\Lib\importlib_init_.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1204, in _gcd_import
File "", line 1176, in _find_and_load
File "", line 1147, in _find_and_load_unlocked
File "", line 690, in _load_unlocked
File "", line 940, in exec_module
File "", line 241, in call_with_frames_removed
File "C:\Users\singh\GitHub\django-ecommerce\djecommerce\settings\development.py", line 1, in
from .base import *
File "C:\Users\singh\GitHub\django-ecommerce\djecommerce\settings\base.py", line 2, in
from decouple import config
ImportError: cannot import name 'config' from 'decouple' (C:\Users\singh\GitHub\django-ecommerce\venv\Lib\site-packages\decouple_init
.py)

@maxjohnsoon
Copy link

You need to run
pip install -r requirements.txt

@beedevservices
Copy link

I am seeing this same error..... i did the above

@Brainboxx
Copy link

Maybe the decouple package wasn't installed due to some issue from your end. Check if it is installed using:
pip show decouple
If it's not installed then you can try installing it exclusively
pip install python-decouple

@pavloflick
Copy link

Who has successfully runned this?

@newtons155
Copy link

The error is related to version. Downgrade the version of decouple

pip install python-decouple==2.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants