-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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' #45
Comments
I think you might have misconfigured your virtual environment or some packages aren't being installed properly. I ran the program myself. It sorta worked. Let me know if I can help. |
The same error is showing to me also |
Bro can u please show me the python packages which you have installed. |
i got this erro also |
i got it pepole this soulution worked with me |
Help it is showing this error |
Hi! if you have installed decouple first uninstall with: then install python-decouple: or only replace the requirements file with: |
Thanks @vincent50 , Your solution helpmed to fix the error !! |
thanks @vincent50 this helped me too |
you have to install :
if you have install
|
i got this error when i try to runserver
please help!!!!!!!!!!!!!!
my steps
1- pip install virtualenv
2- virtualenv env
3- source env/bin/active
4- pip install -r requirements.txt
5- python manage.py runserver
`Traceback (most recent call last):
File "C:\Users\pc\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\management\base.py", line 323, in run_from_argv
self.execute(*args, **cmd_options)
File "C:\Users\pc\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\management\commands\runserver.py", line 60, in execute
super().execute(*args, **options)
File "C:\Users\pc\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\management\base.py", line 364, in execute
output = self.handle(*args, **options)
File "C:\Users\pc\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\management\commands\runserver.py", line 67, in handle
if not settings.DEBUG and not settings.ALLOWED_HOSTS:
File "C:\Users\pc\AppData\Local\Programs\Python\Python37\lib\site-packages\django\conf_init.py", line 79, in getattr
self.setup(name)
File "C:\Users\pc\AppData\Local\Programs\Python\Python37\lib\site-packages\django\conf_init.py", line 66, in setup
self.wrapped = Settings(settings_module)
File "C:\Users\pc\AppData\Local\Programs\Python\Python37\lib\site-packages\django\conf_init.py", line 157, in init
mod = importlib.import_module(self.SETTINGS_MODULE)
File "C:\Users\pc\AppData\Local\Programs\Python\Python37\lib\importlib_init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 967, in _find_and_load_unlocked
File "", line 677, in _load_unlocked
File "", line 728, in exec_module
File "", line 219, in call_with_frames_removed
File "C:\Users\pc\Downloads\django-ecommerce-master\django-ecommerce-master\djecommerce\settings\development.py", line 1, in
from .base import *
File "C:\Users\pc\Downloads\django-ecommerce-master\django-ecommerce-master\djecommerce\settings\base.py", line 2, in
from decouple import config
ImportError: cannot import name 'config' from 'decouple' (C:\Users\pc\AppData\Local\Programs\Python\Python37\lib\site-packages\decouple_init.py)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "manage.py", line 15, in
execute_from_command_line(sys.argv)
File "C:\Users\pc\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\management_init_.py", line 381, in execute_from_command_line
utility.execute()
File "C:\Users\pc\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\management_init_.py", line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "C:\Users\pc\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\management\base.py", line 336, in run_from_argv
connections.close_all()
File "C:\Users\pc\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\utils.py", line 219, in close_all
for alias in self:
File "C:\Users\pc\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\utils.py", line 213, in iter
return iter(self.databases)
File "C:\Users\pc\AppData\Local\Programs\Python\Python37\lib\site-packages\django\utils\functional.py", line 80, in get
res = instance.dict[self.name] = self.func(instance)
File "C:\Users\pc\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\utils.py", line 147, in databases
self.databases = settings.DATABASES
File "C:\Users\pc\AppData\Local\Programs\Python\Python37\lib\site-packages\django\conf_init.py", line 79, in getattr
self.setup(name)
File "C:\Users\pc\AppData\Local\Programs\Python\Python37\lib\site-packages\django\conf_init.py", line 66, in setup
self.wrapped = Settings(settings_module)
File "C:\Users\pc\AppData\Local\Programs\Python\Python37\lib\site-packages\django\conf_init.py", line 157, in init
mod = importlib.import_module(self.SETTINGS_MODULE)
File "C:\Users\pc\AppData\Local\Programs\Python\Python37\lib\importlib_init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 967, in _find_and_load_unlocked
File "", line 677, in load_unlocked
File "", line 728, in exec_module
File "", line 219, in call_with_frames_removed
File "C:\Users\pc\Downloads\django-ecommerce-master\django-ecommerce-master\djecommerce\settings\development.py", line 1, in
from .base import *
File "C:\Users\pc\Downloads\django-ecommerce-master\django-ecommerce-master\djecommerce\settings\base.py", line 2, in
from decouple import config
ImportError: cannot import name 'config' from 'decouple' (C:\Users\pc\AppData\Local\Programs\Python\Python37\lib\site-packages\decouple_init.py)`
The text was updated successfully, but these errors were encountered: