本文介绍了在Windows的Python 3.5上安装Django通道时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 在安装 Twisted 时,我也遇到相同的错误。I'm also getting the same error while installing Twisted.这里的版本信息: Django:1.9 Python:3.5 尝试安装 Django通道 的最新版本 使用的命令: pip安装通道Django : 1.9Python : 3.5Trying to install latest version of Django-channelsCommand used : pip install channels错误:(几乎)完整的错误消息(Almost) full error message.......pip install channelsCollecting channels Using cached channels-1.1.8-py2.py3-none-any.whlCollecting daphne~=1.3 (from channels) Using cached daphne-1.3.0-py2.py3-none-any.whlRequirement already satisfied: asgiref~=1.1 in g:\django\projectChat\venv\lib\site-packages (from channels)Requirement already satisfied: Django>=1.8 in g:\django\projectChat\venv\lib\site-packages (from channels)Requirement already satisfied: autobahn>=0.18 in g:\django\projectChat\venv\lib\site-packages (from daphne~=1.3->channels)Collecting twisted>=17.1 (from daphne~=1.3->channels) Using cached Twisted-17.9.0.tar.bz2Requirement already satisfied: six in g:\django\projectChat\venv\lib\site-packages (from asgiref~=1.1->channels)Requirement already satisfied: txaio>=2.7.0 in g:\django\projectChat\venv\lib\site-packages (from autobahn>=0.18->daphne~=1.3->channels)Requirement already satisfied: zope.interface>=4.0.2 in g:\django\projectChat\venv\lib\site-packages (from twisted>=17.1->daphne~=1.3->channels)Requirement already satisfied: constantly>=15.1 in g:\django\projectChat\venv\lib\site-packages (from twisted>=17.1->daphne~=1.3->channels)Requirement already satisfied: incremental>=16.10.1 in g:\django\projectChat\venv\lib\site-packages (fromtwisted>=17.1->daphne~=1.3->channels)Requirement already satisfied: Automat>=0.3.0 in g:\django\projectChat\venv\lib\site-packages (from twisted>=17.1->daphne~=1.3->channels)Requirement already satisfied: hyperlink>=17.1.1 in g:\django\projectChat\venv\lib\site-packages (from twisted>=17.1->daphne~=1.3->channels)Requirement already satisfied: setuptools in g:\django\projectChat\venv\lib\site-packages (from zope.interface>=4.0.2->twisted>=17.1->daphne~=1.3->channels)Requirement already satisfied: attrs in g:\django\projectChat\venv\lib\site-packages (from Automat>=0.3.0->twisted>=17.1->daphne~=1.3->channels)Installing collected packages: twisted, daphne, channels Running setup.py install for twisted ... error Complete output from command G:\django\projectChat\venv\Scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Mike\\AppData\\Local\\Temp\\pip-build-ngnwgsvg\\twisted\\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\Mike\AppData\Local\Temp\pip-y5sbi03u-record\install-record.txt --single-version-externally-managed --compile --install-headers G:\django\projectChat\venv\include\site\python3.5\twisted: running install running build running build_py creating build creating build\lib.win-amd64-3.5 creating build\lib.win-amd64-3.5\twisted copying src\twisted\copyright.py -> build\lib.win-amd64-3.5\twisted copying src\twisted\plugin.py -> build\lib.win-amd64-3.5\twisted copying src\twisted\_version.py -> build\lib.win-amd64-3.5\twisted copying src\twisted\__init__.py -> build\lib.win-amd64-3.5\twisted copying src\twisted\__main__.py -> build\lib.win-amd64-3.5\twisted creating build\lib.win-amd64-3.5\twisted\application copying src\twisted\application\app.py -> build\lib.win-amd64-3.5\twisted\application copying src\twisted\application\internet.py -> build\lib.win-amd64-3.5\twisted\application copying src\twisted\application\reactors.py -> build\lib.win-amd64-3.5\twisted\application copying src\twisted\application\service.py -> build\lib.win-amd64-3.5\twisted\application copying src\twisted\application\strports.py -> build\lib.win-amd64-3.5\twisted\application copying src\twisted\application\__init__.py -> build\lib.win-amd64-3.5\twisted\application creating build\lib.win-amd64-3.5\twisted\conch copying src\twisted\conch\avatar.py -> build\lib.win-amd64-3.5\twisted\conch [...] creating build\lib.win-amd64-3.5\twisted\_threads\test copying src\twisted\_threads\test\test_convenience.py -> build\lib.win-amd64-3.5\twisted\_threads\test copying src\twisted\_threads\test\test_memory.py -> build\lib.win-amd64-3.5\twisted\_threads\test copying src\twisted\_threads\test\test_team.py -> build\lib.win-amd64-3.5\twisted\_threads\test copying src\twisted\_threads\test\test_threadworker.py -> build\lib.win-amd64-3.5\twisted\_threads\test copying src\twisted\_threads\test\__init__.py -> build\lib.win-amd64-3.5\twisted\_threads\test running egg_info writing dependency_links to src\Twisted.egg-info\dependency_links.txt writing entry points to src\Twisted.egg-info\entry_points.txt writing src\Twisted.egg-info\PKG-INFO writing top-level names to src\Twisted.egg-info\top_level.txt writing requirements to src\Twisted.egg-info\requires.txt reading manifest file 'src\Twisted.egg-info\SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no previously-included files matching '*.misc' found under directory 'src\twisted' warning: no previously-included files matching '*.bugfix' found under directory 'src\twisted' warning: no previously-included files matching '*.doc' found under directory 'src\twisted' warning: no previously-included files matching '*.feature' found under directory 'src\twisted' warning: no previously-included files matching '*.removal' found under directory 'src\twisted' warning: no previously-included files matching 'NEWS' found under directory 'src\twisted' warning: no previously-included files matching 'README' found under directory 'src\twisted' warning: no previously-included files matching 'newsfragments' found under directory 'src\twisted' warning: no previously-included files found matching 'src\twisted\topfiles\CREDITS' warning: no previously-included files found matching 'src\twisted\topfiles\ChangeLog.Old' warning: no previously-included files found matching 'pyproject.toml' warning: no previously-included files found matching 'codecov.yml' warning: no previously-included files found matching 'appveyor.yml' no previously-included directories found matching 'bin' no previously-included directories found matching 'admin' no previously-included directories found matching '.travis' warning: no previously-included files found matching 'docs\historic\2003' warning: no previously-included files matching '*' found under directory 'docs\historic\2003' writing manifest file 'src\Twisted.egg-info\SOURCES.txt' copying src\twisted\python\_sendmsg.c -> build\lib.win-amd64-3.5\twisted\python copying src\twisted\python\twisted-completion.zsh -> build\lib.win-amd64-3.5\twisted\python creating build\lib.win-amd64-3.5\twisted\python\_pydoctortemplates copying src\twisted\python\_pydoctortemplates\common.html -> build\lib.win-amd64-3.5\twisted\python\_pydoctortemplates copying src\twisted\python\_pydoctortemplates\index.html -> build\lib.win-amd64-3.5\twisted\python\_pydoctortemplates copying src\twisted\python\_pydoctortemplates\summary.html -> build\lib.win-amd64-3.5\twisted\python\_pydoctortemplates copying src\twisted\test\cert.pem.no_trailing_newline -> build\lib.win-amd64-3.5\twisted\test copying src\twisted\test\key.pem.no_trailing_newline -> build\lib.win-amd64-3.5\twisted\test copying src\twisted\test\raiser.c -> build\lib.win-amd64-3.5\twisted\test copying src\twisted\test\raiser.pyx -> build\lib.win-amd64-3.5\twisted\test copying src\twisted\test\server.pem -> build\lib.win-amd64-3.5\twisted\test copying src\twisted\internet\iocpreactor\build.bat -> build\lib.win-amd64-3.5\twisted\internet\iocpreactor copying src\twisted\internet\iocpreactor\notes.txt -> build\lib.win-amd64-3.5\twisted\internet\iocpreactor creating build\lib.win-amd64-3.5\twisted\internet\iocpreactor\iocpsupport copying src\twisted\internet\iocpreactor\iocpsupport\acceptex.pxi -> build\lib.win-amd64-3.5\twisted\internet\iocpreactor\iocpsupport copying src\twisted\internet\iocpreactor\iocpsupport\connectex.pxi -> build\lib.win-amd64-3.5\twisted\internet\iocpreactor\iocpsupport copying src\twisted\internet\iocpreactor\iocpsupport\iocpsupport.c -> build\lib.win-amd64-3.5\twisted\internet\iocpreactor\iocpsupport copying src\twisted\internet\iocpreactor\iocpsupport\iocpsupport.pyx -> build\lib.win-amd64-3.5\twisted\internet\iocpreactor\iocpsupport copying src\twisted\internet\iocpreactor\iocpsupport\winsock_pointers.c -> build\lib.win-amd64-3.5\twisted\internet\iocpreactor\iocpsupport copying src\twisted\internet\iocpreactor\iocpsupport\winsock_pointers.h -> build\lib.win-amd64-3.5\twisted\internet\iocpreactor\iocpsupport copying src\twisted\internet\iocpreactor\iocpsupport\wsarecv.pxi -> build\lib.win-amd64-3.5\twisted\internet\iocpreactor\iocpsupport copying src\twisted\internet\iocpreactor\iocpsupport\wsasend.pxi -> build\lib.win-amd64-3.5\twisted\internet\iocpreactor\iocpsupport copying src\twisted\internet\test\_awaittests.py.3only -> build\lib.win-amd64-3.5\twisted\internet\test copying src\twisted\internet\test\_yieldfromtests.py.3only -> build\lib.win-amd64-3.5\twisted\internet\test creating build\lib.win-amd64-3.5\twisted\internet\test\fake_CAs copying src\twisted\internet\test\fake_CAs\chain.pem -> build\lib.win-amd64-3.5\twisted\internet\test\fake_CAs copying src\twisted\internet\test\fake_CAs\not-a-certificate -> build\lib.win-amd64-3.5\twisted\internet\test\fake_CAs copying src\twisted\internet\test\fake_CAs\thing1.pem -> build\lib.win-amd64-3.5\twisted\internet\test\fake_CAs copying src\twisted\internet\test\fake_CAs\thing2-duplicate.pem -> build\lib.win-amd64-3.5\twisted\internet\test\fake_CAs copying src\twisted\internet\test\fake_CAs\thing2.pem -> build\lib.win-amd64-3.5\twisted\internet\test\fake_CAs copying src\twisted\mail\test\rfc822.message -> build\lib.win-amd64-3.5\twisted\mail\test copying src\twisted\python\test\_deprecatetests.py.3only -> build\lib.win-amd64-3.5\twisted\python\test copying src\twisted\words\im\instancemessenger.glade -> build\lib.win-amd64-3.5\twisted\words\im copying src\twisted\words\xish\xpathparser.g -> build\lib.win-amd64-3.5\twisted\words\xish running build_ext building 'twisted.test.raiser' extension error: [WinError 2] The system cannot find the file specified ----------------------------------------Command "G:\django\projectChat\venv\Scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Mike\\AppData\\Local\\Temp\\pip-build-ngnwgsvg\\twisted\\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\Mike\AppData\Local\Temp\pip-y5sbi03u-record\install-record.txt --single-version-externally-managed --compile --install-headers G:\django\projectChat\venv\include\site\python3.5\twisted" failed with error code 1 in C:\Users\Mike\AppData\Local\Temp\pip-build-ngnwgsvg\twisted\我不知道我在想什么,cI don't know what i'm missing, could someone help me please, thanks.推荐答案我遇到了类似的问题……我只能通过下载来修复它Visual Studio生成工具并安装Visual C ++生成工具,Windows 10 SDK和VC ++ 2015.3 v14I had a similar problem... I was only able to fix it by downloading Visual Studio Build tools and installing the Visual C++ Build Tools, Windows 10 SDK, and VC++ 2015.3 v14 这篇关于在Windows的Python 3.5上安装Django通道时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 09-05 10:11