У меня не было проблем с запуском django, но когда я собирался запустить 'django -admin startproject', он говорит, что в моей папке Python нет каталога 'django -admin'. Поэтому я попытался установить с помощью pip install django -admin.
Вот ошибка:
C:\Users\syahm>pip install django-admin
Collecting django-admin
Using cached django_admin-2.0.1-py2.py3-none-any.whl (7.6 kB)
Collecting django-excel-response2>=3.0.0
Using cached django_excel_response2-3.0.2-py2.py3-none-any.whl (4.4 kB)
Collecting django-excel-base>=1.0.4
Using cached django_excel_base-1.0.4-py2.py3-none-any.whl (4.0 kB)
Requirement already satisfied: django-six>=1.0.4 in c:\users\syahm\appdata\local\programs\python\python37-32\lib\site-packages (from django-excel-response2>=3.0.0->django-admin) (1.0.4)
Requirement already satisfied: xlwt in c:\users\syahm\appdata\local\programs\python\python37-32\lib\site-packages (from django-excel-base>=1.0.4->django-excel-response2>=3.0.0->django-admin) (1.3.0)
Collecting screen
Using cached screen-1.0.1.tar.gz (8.6 kB)
Requirement already satisfied: pytz in c:\users\syahm\appdata\roaming\python\python37\site-packages (from django-excel-base>=1.0.4->django-excel-response2>=3.0.0->django-admin) (2019.2)
Installing collected packages: screen, django-excel-base, django-excel-response2, django-admin
Running setup.py install for screen ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\syahm\appdata\local\programs\python\python37-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\syahm\\AppData\\Local\\Temp\\pip-install-o89ws43u\\screen\\setup.py'"'"'; __file__='"'"'C:\\Users\\syahm\\AppData\\Local\\Temp\\pip-install-o89ws43u\\screen\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\syahm\AppData\Local\Temp\pip-record-t_rdgtfv\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\syahm\appdata\local\programs\python\python37-32\Include\screen'
cwd: C:\Users\syahm\AppData\Local\Temp\pip-install-o89ws43u\screen\
Complete output (18 lines):
running install
running build
running build_py
creating build
creating build\lib.win32-3.7
creating build\lib.win32-3.7\screen
copying screen\compat.py -> build\lib.win32-3.7\screen
copying screen\old_str_util.py -> build\lib.win32-3.7\screen
copying screen\__init__.py -> build\lib.win32-3.7\screen
running build_ext
building 'screen.str_util' extension
creating build\temp.win32-3.7
creating build\temp.win32-3.7\Release
creating build\temp.win32-3.7\Release\source
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\bin\HostX86\x86\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -Ic:\users\syahm\appdata\local\programs\python\python37-32\include -Ic:\users\syahm\appdata\local\programs\python\python37-32\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\include" /Tcsource/str_util.c /Fobuild\temp.win32-3.7\Release\source/str_util.obj
str_util.c
c:\users\syahm\appdata\local\programs\python\python37-32\include\pyconfig.h(59): fatal error C1083: Cannot open include file: 'io.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.25.28610\\bin\\HostX86\\x86\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\syahm\appdata\local\programs\python\python37-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\syahm\\AppData\\Local\\Temp\\pip-install-o89ws43u\\screen\\setup.py'"'"'; __file__='"'"'C:\\Users\\syahm\\AppData\\Local\\Temp\\pip-install-o89ws43u\\screen\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\syahm\AppData\Local\Temp\pip-record-t_rdgtfv\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\syahm\appdata\local\programs\python\python37-32\Include\screen' Check the logs for full command output.