16π
I think you have 2 versions of django installed, and both are being called when trying to start the project.
Try running pip uninstall django twice, if it runs both time then this was what was going on. Obviously, pip install django afterwards to get it working again
2π
I had the same problem after using pip to install django 1.10 over an older version.
I used pip to uninstall and manually deleted the leftover django folder in the site-packages folder.
re-installed using pip, and now it is working with no problem.
- Django models β assign id instead of object
- Self.model() in django custom UserManager
- Is the Global Request variable in Python/Django available?
2π
I am also working with docker
containers. I had this problem where it said that manage.py
already exists in the workdirectory (that I made through the Dockerfile
file) when I tried to restart the process of making a container after deleting the old one.
It did not show me where the workdirectory was made and hence could not delete the manage.py
as pointed out in the error.
The solution that worked was I changed the service name in my yml
file and gave the command with new servicenm
docker-compose run servicenm django-admin.py startproject projectnm
directory
- Annotate django query if filtered row exists in second table
- Django: logging only for my project's apps
- Differences between `class` and `def`
- Error "Could not load Boto's S3 bindings."
- Django with NoSQL database
- Does Django use processes or threads to handle user requests in view?
- Django Rest Framework won't let me have more than one permission
- Django sub-applications & module structure
- How to create a Django superuser if it doesn't exist non-interactively?
0π
Make sure that if you have deleted (rm -r
) βyour Django project_nameβ to also delete (rm
) the manage.py corresponding deleted project python file in the same repository.
0π
sudo pip uninstall django
sudo rm /usr/local/lib/python2.7/dist-packages/django/ -rf
sudo pip install django==1.10
This resolved my problem.
- How To Upload File with Django Rest APi
- Set db per model in django
- Docker + Celery tells me not to run as root, but once I don't, I lack permissions to run
0π
You need to define another directory for your new project. Not /ehgg directory.
It seems though you are creating a new project inside your old project.
And this error clearly state that, there is old setting i.e βmanage.pyβ for your old project. Since every time a new settings manage.py created for your new project.
I hope itβs clear to you.
Thank you.
- Reverse Queryset Order in Django
- Django Formset.is_valid() failing for extra forms
- How to implement a paginator that doesn't call count(*)
0π
Check whether the project name is correct or not. Django avoids
hypens (-
) in project names.
0π
It can happen due to two reasons:
- You are trying to create a new folder with the exiting folder name.
- You have previously deleted a folder with this name. Deleted it for some reason. But again trying to create package with this name.
To resolve this follow
-
Rename the manage.py from your project folder.
-
Go to <%System Path%>/PycharmProjects/<%Your Project Name%>/.idea/workspace.xml
edit this file βworkspace.xmlβ and then search with the package name you are trying to create.
delete that line and save the file.
Now try to run the command again.
I hope this helps.
Regards,
- Serialize multiple models and send all in one json response django rest framework
- Example when request.POST contain query string in django
- Additional Serializer Fields in Django REST Framework 3
- Django forms.ChoiceField without validation of selected value
- Sending messages to groups in Django Channels 2