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

ModuleNotFoundError: No module named 'decouple' #69

Open
kirti-yelavikar opened this issue Mar 16, 2021 · 2 comments
Open

ModuleNotFoundError: No module named 'decouple' #69

kirti-yelavikar opened this issue Mar 16, 2021 · 2 comments

Comments

@kirti-yelavikar
Copy link

When I tried to run server with command:

python manage.py runserver

a big error log comes this isthe last part of that error log:

res = instance.__dict__[self.name] = self.func(instance)

File "C:\Users\kirti\AppData\Local\Programs\Python\Python39\lib\site-packages\django\db\utils.py", line 153, in databases
self.databases = settings.DATABASES
File "C:\Users\kirti\AppData\Local\Programs\Python\Python39\lib\site-packages\django\conf_init
.py", line 82, in getattr
self.setup(name)
File "C:\Users\kirti\AppData\Local\Programs\Python\Python39\lib\site-packages\django\conf_init
.py", line 69, in setup
self.wrapped = Settings(settings_module)
File "C:\Users\kirti\AppData\Local\Programs\Python\Python39\lib\site-packages\django\conf_init
.py", line 170, in init
mod = importlib.import_module(self.SETTINGS_MODULE)
File "C:\Users\kirti\AppData\Local\Programs\Python\Python39\lib\importlib_init
.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked

H:\study material\Web development\React\ecom\django-ecommerce>python manage.py runserver
Traceback (most recent call last):
File "C:\Users\kirti\AppData\Local\Programs\Python\Python39\lib\site-packages\django\core\management\base.py", line 330, in run_from_argv
self.execute(*args, **cmd_options)
File "C:\Users\kirti\AppData\Local\Programs\Python\Python39\lib\site-packages\django\core\management\commands\runserver.py", line 61, in execute
super().execute(*args, **options)
File "C:\Users\kirti\AppData\Local\Programs\Python\Python39\lib\site-packages\django\core\management\base.py", line 371, in execute
output = self.handle(*args, **options)
File "C:\Users\kirti\AppData\Local\Programs\Python\Python39\lib\site-packages\django\core\management\commands\runserver.py", line 68, in handle
if not settings.DEBUG and not settings.ALLOWED_HOSTS:
File "C:\Users\kirti\AppData\Local\Programs\Python\Python39\lib\site-packages\django\conf_init_.py", line 82, in getattr
self.setup(name)
File "C:\Users\kirti\AppData\Local\Programs\Python\Python39\lib\site-packages\django\conf_init
.py", line 69, in setup
self.wrapped = Settings(settings_module)
File "C:\Users\kirti\AppData\Local\Programs\Python\Python39\lib\site-packages\django\conf_init
.py", line 170, in init
mod = importlib.import_module(self.SETTINGS_MODULE)
File "C:\Users\kirti\AppData\Local\Programs\Python\Python39\lib\importlib_init
.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 790, in exec_module
File "", line 228, in _call_with_frames_removed
File "H:\study material\Web development\React\ecom\django-ecommerce\djecommerce\settings\development.py", line 1, in
from .base import *
File "H:\study material\Web development\React\ecom\django-ecommerce\djecommerce\settings\base.py", line 2, in
from decouple import config
ModuleNotFoundError: No module named 'decouple'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "H:\study material\Web development\React\ecom\django-ecommerce\manage.py", line 15, in
execute_from_command_line(sys.argv)
File "C:\Users\kirti\AppData\Local\Programs\Python\Python39\lib\site-packages\django\core\management_init_.py", line
401, in execute_from_command_line
utility.execute()
File "C:\Users\kirti\AppData\Local\Programs\Python\Python39\lib\site-packages\django\core\management_init_.py", line
395, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "C:\Users\kirti\AppData\Local\Programs\Python\Python39\lib\site-packages\django\core\management\base.py", line 343, in run_from_argv
connections.close_all()
File "C:\Users\kirti\AppData\Local\Programs\Python\Python39\lib\site-packages\django\db\utils.py", line 232, in close_all
for alias in self:
File "C:\Users\kirti\AppData\Local\Programs\Python\Python39\lib\site-packages\django\db\utils.py", line 226, in iter
return iter(self.databases)
File "C:\Users\kirti\AppData\Local\Programs\Python\Python39\lib\site-packages\django\utils\functional.py", line 48, in get
res = instance.dict[self.name] = self.func(instance)
File "C:\Users\kirti\AppData\Local\Programs\Python\Python39\lib\site-packages\django\db\utils.py", line 153, in databases
self.databases = settings.DATABASES
File "C:\Users\kirti\AppData\Local\Programs\Python\Python39\lib\site-packages\django\conf_init
.py", line 82, in getattr
self.setup(name)
File "C:\Users\kirti\AppData\Local\Programs\Python\Python39\lib\site-packages\django\conf_init
.py", line 69, in setup
self.wrapped = Settings(settings_module)
File "C:\Users\kirti\AppData\Local\Programs\Python\Python39\lib\site-packages\django\conf_init
.py", line 170, in init
mod = importlib.import_module(self.SETTINGS_MODULE)
File "C:\Users\kirti\AppData\Local\Programs\Python\Python39\lib\importlib_init
.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 790, in exec_module
File "", line 228, in _call_with_frames_removed
File "H:\study material\Web development\React\ecom\django-ecommerce\djecommerce\settings\development.py", line 1, in
from .base import *
File "H:\study material\Web development\React\ecom\django-ecommerce\djecommerce\settings\base.py", line 2, in
from decouple import config
ModuleNotFoundError: No module named 'decouple'

@shreyashsrivastava
Copy link

Did you run this first pip install -r requirements.txt ?

@thethinkingmonks
Copy link

you need to create your virtual env and install the packages

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

3 participants