django-admin.py: No module named deltatest.settings - python

I am new to Django.
I have built some project with django-admin.py before, but suddenly it doesn't work anymore.
When I try to run django-admin.py, there is an error "ImportError: No module named deltatest.settings".
I unstalled and reinstalled django but it also show those mistake.
Would you help me to find out the problem?
Thank you very much!

Related

Jupyter Notebook : ModuleNotFoundError: No module named 'sqlalchemy'

I have installed sqlalchemy and its getting imported in python in powershell
But when I am trying to import in jupyter notebook, its showing module not found error.
I tried installing it in the notebook and then importing it but no success
I am really stuck. Any help will be appreciated.
Thanks in advance.
A bit of a guess but maybe you need to reopen the notebook after installing - python does not reload its installations before you do it.
I got the solution from this post
"ImportError: No module named" when trying to run Python script
I had to add the path of the module folder to sys.
import sys
sys.path.append('my/path/to/module/folder')
import sqlalchemy

Why am I seeing "No module named '_tkinter" when I deploy django to heroku?

django works well on my local machine. But, when I deploy it to heroku, I see "ModuleNotFoundError" "No module named '_tkinter'". Though, I never imported "_tkinter" or "tkinter" in my code. Your help will be appreciated. Thank you.
ModuleNotFoundError at /
No module named '_tkinter'
Request Method: GET
Request URL: https://howididit.herokuapp.com/
Django Version: 4.0.6
Exception Type: ModuleNotFoundError
Exception Value:
No module named '_tkinter'
Exception Location: /app/.heroku/python/lib/python3.10/tkinter/init.py, line 37, in
Python Executable: /app/.heroku/python/bin/python
Python Version: 3.10.5
Python Path:
['/app/.heroku/python/bin',
'/app',
'/app/.heroku/python/lib/python310.zip',
'/app/.heroku/python/lib/python3.10',
'/app/.heroku/python/lib/python3.10/lib-dynload',
'/app/.heroku/python/lib/python3.10/site-packages']
If you don't use Tkinter, just remove it from /forms.py. otherwise it'll be imported.
If you want to use tkinter,then consider the below process
please try adding tkinter to your requirements.txt. If it fails, even after that, check if you have added Python buildpack. If both the cases pass, try shelling into your Heroku instances and run the following command:
sudo apt install python3-tk
This will install Tkinter library in your instance of Heroku. That will resolve your error.
I found out these from pyexpat import model from turtle import title from attr import fields where imported in my forms.py. After deleting them, The problem was solved. Again, thank you all guys for your time, I really appreciate it.
Okay so for anyone looking at this in the future and banging their head against the desk...this is what worked for me:
I started with a new Hello World app and started adding bits of my original code until i got to the error
found out that one of the modules I was using : icu, was using tkinter and i needed to install the Pyicu module instead
pip installed directly into heroku bash console instead of through my app
None of the answers i found online had worked for me, and I think its because this error isnt from having tkinter directly in your app, but from another module thats calling it.
When in doubt do what I did and start a new project from scratch and add chunks of code until you get the error to see which module is creating it
Dont forget to change DEBUG to False in your settings file

ModuleNotFoundError: No module named 'botocore'

I have worked with CMD version of Elastic Beanstalk using eb on May 25.But today I am facing this issue while trying to hit the command 'eb init'.
I am attaching the screenshot here.Even though botocore module is present,I am getting error that ModuleNotFoundError: No module named 'botocore'.
Am I missing something? Please let me know.
Reinstalling ebcli resolved the issue.
Thank you #rzlvmp and #CristiFati for your response.

problem with manage.py: No module named 'django'

When I tried to execute python manage.py runserver, it failed due to the SyntaxError. Then I tried it with python 3, it still didn't help and said "No module named 'django'".
However, when I searched the packages in my virtualenv, it seemed that django is inside this virtualenv.
It seems like it's using the local packages but not the packages inside the virtualenv.
Can someone help me resolve this problem? Thx

No module named admin_view_permission, CircleCI?

When I run my Django project on CircleCI I get the following error: "ModuleNotFoundError: No module named 'admin_view_permission'"
The project runs with no problems locally on my computer. I added the module admin_view_premissions, to settings, from this page: https://github.com/ctxis/django-admin-view-permission
Then I ran "pip install django-admin-view-permission", and it worked fine. The migration also did not have any problems.
Does anyone know why CircleCI is not able to find the module?
Thank you for your time!
I had to write the package in the Pip-file by using: pipenv install django-admin-view-permission

Categories

Resources