14👍
That’s already been reported to the django, see http://bugs.python.org/issue7936
And these’s an solution:
open regedit and find python.exe like this
“C:\Python26\python.exe” “%1”
change it to
“C:\Python26\python.exe” “%1” %*
13👍
This is what worked for me:
I already had c:\python27 and c:\python27\Scripts in PATH.
- Copy django-admin.py and django-admin-script.py from c:\python27\Scripts to your desired folder
- with cmd go to that folder and run > django-admin startproject mysite
Note that if I doesn’t type python
windows just opens the django-admin.py
in editor.
9👍
I had the same error when I ran django-admin.py
on the command prompt. I couldn’t create a projects.
I tried to run Regedit by using Find to Search python.exe and then adding %%
but it was not sufficient.
I then added the necessary Path to the System PATH as shown below.
Open:
Control Panel -> System -> Advanced -> Environment Variables -> PATH.
Add to the PATH:
C:\Python27\python.exe;C:\Python27\Scripts;C:\Python27\Lib\site-packages\django\bin
It Work! Now I can Create Django Projects and applications Using Command on Windows 7.
- Django success url using kwargs
- Run django application without django.contrib.admin
- Django: foreign key value in a list display admin
- Django – How ModelChoiceField queryset's works?
- How to deploy a subdirectory of git repo to elastic beanstalk
2👍
In latest django(1.11.7 for now) , simple django-admin
would work, instead of django-admin.py
.
1👍
I had the same problem i followed django-admin.py startproject mysite not working well on windows 7
and found that the python files still associated with my text editor.
Changing the necessary registry keys fix the issue.
- Unsupported lookup 'istartwith' for CharField or join on the field not permitted
- How to generate presigned S3 urls using django-storages?
- Django South migration conflict while working in a team
1👍
I also had the same problem but don’t worry its simple to solve this problem, just add “C:\Users\Nik’s\myenv\Scripts” to the enviroment veriables and its done.
The address may be differnt in your pc as it depends where you install it.
0👍
Change the first line of django-admin.py #!/usr/bin/env python
to for example #!D:\Program Files\Python\python.exe
(Where you install your python.exe
,that’s my directory); it works.
- Django – how to get user logged in (get_queryset in ListView)
- How to locally test Django's Sites Framework
- Customize logging for external/third-party libs
- Nested loop in Django template
- Django-storages get the full S3 url
0👍
The solution is simple in Windows:
1-Go to C: \ Python34 \ Scripts
2-Right click on django-admin.py
3-Select open with
4-Select default program
5-Select Laucher Python for Windows (Console)
6- Run the command in CMD Windows python django-admin.py startproject mysite
0👍
In Windows 8.1, I faced the same problem. In my case when I tried to create my project, it would open the contents of the page in Internet Explorer window rather than creating the project folder. I became curious of what exactly was this django-manage.py. After searching, I got to django-admin.py file in the path C:\Python34\Scripts and I right clicked on it chose to open with default program of Launcher Python for Windows(Console).
Again I got back to the CMD and in my project directory I entered:
django-admin.py startproject mysite
And worked just fine.!!!
- Logging output running django tests under Pycharm
- Unable to find/build a commenting system similar as at Djangobook
- Django formset – show extra fields only when no initial data set?
- Celery chaining tasks sequentially
0👍
I have faced the same issue and when I ran the Python installer again and clicked on the repair option, it magically fixed everything for me. Now, I can run django-admin
straight from CMD.
- Extend django Groups and Permissions
- How to run multiple Django sites on Nginx and uWSGI?
- How to track the progress of individual tasks inside a group which forms the header to a chord in celery?
0👍
- first of all make sure that python/Scripts is in your path
- run “django-admin startproject mysite” instead of “django-admin.py startproject mysite”
- Django Testing: Does –keepdb reset changes made during tests?
- Non-queryset data ordering in django-tables2
- South with django 1.7
- How to filter search by values that are not available
- Django Test Client and Subdomains
0👍
I get the same problem for Windows 10. Here is how I resolve it:
- I run the terminal CMD with administrator right. How to do that ? Right click on the terminal and click on Run as administrator.
- I install django by doing:
python -m pip install django
. You can check that django is really installed by doing:python -m pip freeze
. If you see django in the list, then django is installed. - Finally, I create my django project by doing:
django-admin startproject project-name
.
NB: For step 3, you don’t need the terminal with administrator right.
- How to override field value display in Django admin change form
- Why don't Django and CherryPy support HTTP verb-based dispatch natively?
- How to configure Apache to run ASGI in Django Channels? Is Apache even required?
- Django ORM leaks connections when using ThreadPoolExecutor
- Pytest and Django settings runtime changes