30π
Iβm not sure what you did to produce this error, but the fix for you is to change /usr/local/bin/django-admin.py
shebang to #!/usr/bin/env python
.
Actually if you install django in a virtualenv, the django-admin.py
will have the shebang set to the python interpreter of your virtualenv, but this script will not be created in /usr/local/bin/
.
Instead this script will be created in /<virtualenvpath>/bin/
along with activate
and the virtualenv python interpreter. You should then move this script to /usr/local/bin/
.
2π
For me, It was that the last program or script that i invoked didnβt correctly end. In that case (base) marks in front of your command when you are using the terminal[mac].
To deactivate the environment,
source deactivate
OR // if using conda
conda deactivate
- Python: Can dumpdata cannot loaddata back. UnicodeDecodeError
- Pivoting data and complex annotations in Django ORM
- Django ALLOWED_HOSTS with ELB HealthCheck
1π
For django latest version use
django-admin startproject mysite
This works for me.
change my to your project name.
No need to use django-admin.py use django-admin only.
Activate your environment. Then use the above comment.
- Errno 13 while running docker-compose up
- Django β How to save m2m data via post_save signal?
- Django testing how to assert Redirect
- Override default queryset with using as_manager
- Celery: auto discovery does not find tasks module in app
0π
This error can occur when you move your project to a different directory, for example, if your former directory was:
/Users/theuser/complete-ml-ds/sample_project/env/bin/python3-config
then it has to be updated to the new directory at the very top of python3-config file
Update the directory information:
!/Users/theuser/complete-ml-ds/sample_project/env/bin/python3.8
with your new directory
- How to limit choice field options based on another choice field in django admin
- What is the use of cleaned_data in Django
- Render one queryset into 2 div columns (django template)
- How to avoid n+1 select in Django?
0π
I uninstalled and reinstalled Django to resolve this issue
pip uninstall django
Then pip install django
.
P.S. donβt forget to install the same Django version as what you were using.
- RuntimeError: Model class xxx doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS
- Get the version of Django for application
- TemplateDoesNotExist at / base.html