Back

Explore Courses Blog Tutorials Interview Questions

Explore Tech Questions and Answers

Welcome to Intellipaat Community. Get your technical queries answered by top developers!

0 votes
2 views
by (19.9k points)

I'm trying to install any packages and I am unable to. I use pip install package. But, after successfully installing. When I try to run the application, I get a the following error.

 return _bootstrap._gcd_import(name[level:], package, level)

  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import

  File "<frozen importlib._bootstrap>", line 983, in _find_and_load

  File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked

  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed

  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import

  File "<frozen importlib._bootstrap>", line 983, in _find_and_load

  File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked

ModuleNotFoundError: No module named 'settings'

This seems to be a common problem discuss in a lot of groups, but I have not found any solutions. I've been working on this all day. Please help. New to django.

https://groups.google.com/forum/#!topic/django-users/0tAtr4NBJ_4 http://www.techlighting.info/django-channels-tutorial-1-creating-a-chat-application/

I think that my project is not connecting to the packages correctly.

Here is my file relationship.

This is where the project is:

Documents > Projects > hosproject > catalog, manage.py, hosproject2, venv

This is where the packages are

Documents > trydjango > lib >python3.7>site.packages>packages

Here is my istalled app:

INSTALLED_APPS = [

    'django.contrib.admin',

    'django.contrib.auth',

    'django.contrib.contenttypes',

    'django.contrib.sessions',

    'django.contrib.messages',

    'django.contrib.staticfiles',

    'catalog',

    'import-export', #this breaks when I try to install today

    'django_tables2', # this I installed hsitorically ( a month ago and works)

    #'csvimport.app.CSVImportConf', # this breaks it

]

Basically any package will break it if I try an install now. Packages that I installed historically work.

1 Answer

0 votes
by (25.1k points)

You need to specify the third party packages in your settings file like this

INSTALLED_APPS = [

    'django.contrib.admin',

    'django.contrib.auth',

    'django.contrib.contenttypes',

    'django.contrib.sessions',

    'django.contrib.messages',

    'django.contrib.staticfiles',

    # third party packages

    'package',

]

Browse Categories

...