2

Historically, I was able to easily install packages on my app, but after installing Heroku and whitenoise, soemthing broke. I tried to rebuild the app, virtualvenv from scratch, according to best conventions, but nothing fixes it. Now, any package I try to install I get this error. The packages successfully install, but 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.

I think it has to do with my path and wgsi: I've tried to play around with this setting it to different things, but cannot set it correctly where it works. This is my last attempt.

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings.local")

0 Answers0