After upgrading to django 1.9 and tried creating new project.Getting following error How should i solve this?
After upgrading to django 1.9 and creating new project following error occurred CommandError: /home/shaastr/ehgg/manage.py already exists, overlaying a project or app into an existing directory won't replace conflicting files
command not found: django-admin django-admin should be on your system path if you installed Django via pip . If it's not in your path, ensure you have your virtual environment activated and you can try running the equivalent command python -m django .
Run django-admin help to display usage information and a list of the commands provided by each application. Run django-admin help --commands to display a list of all available commands. Run django-admin help <command> to display a description of the given command and a list of its available options.
at the end of the django-admin startproject command: (env) $ django-admin startproject <projectname> . The dot skips the top-level project folder and creates your management app and the manage.py file right inside your current working directory. You might encounter this syntax in some online Django tutorials.
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
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.
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
remove manage.py then re-run your django-admin startproject command, it will work
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With