我试图让PIP安装Twisted但我得到了这个LINK错误。
我使用64位Windows 8与python 2.7.10。 我认为这个问题与Visual Studio编译器有关。我有2009年和2010年,但我不确定它使用哪一个。我已经浏览了大量关于这个问题和Visual Studio的stackoverflow帖子......但没有人真的帮助过我。我试过的东西来自:使用PIP安装Python包会导致LINK:致命错误LNK1104:无法打开文件'python27.lib'
Cannot find vcvarsall.bat when running a Python script
Errors while building/installing C module for Python 2.7
实际上,我是有这个问题与CFFI和密码为好,但我用车轮和通过,这些安装包的轮子文件。这是一个解决方法...但是对于Twisted 10.0.0,没有轮子文件,所以我无法绕过它。
这是消息发送前的最后一个消息。
reading manifest file 'Twisted.egg-info\SOURCES.txt'
writing manifest file 'Twisted.egg-info\SOURCES.txt'
creating build\lib.win-amd64-2.7\twisted\internet\iocpreactor\iocpsupport
copying twisted\internet/iocpreactor/iocpsupport\iocpsupport.c -> build\lib.win-amd64-2.7\twisted\internet/iocpreactor/iocpsupport
copying twisted\internet/iocpreactor/iocpsupport\winsock_pointers.c -> build\lib.win-amd64-2.7\twisted\internet/iocpreactor/iocpsupport
copying twisted\python\sendmsg.c -> build\lib.win-amd64-2.7\twisted\python
copying twisted\runner\portmap.c -> build\lib.win-amd64-2.7\twisted\runner
copying twisted\test\raiser.c -> build\lib.win-amd64-2.7\twisted\test
running build_ext
C:\Users\Andrew\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\Users\Andrew\.virtualenvs\adventure_time\include -IC:\Users\Andrew\.virtualenvs\adventure_time\PC /Tcconftest.c /Foconftest.obj
conftest.c
conftest.c(1) : fatal error C1083: Cannot open include file: 'rpc/rpc.h': No such file or directory
building 'twisted.test.raiser' extension
creating build\temp.win-amd64-2.7
creating build\temp.win-amd64-2.7\Release
creating build\temp.win-amd64-2.7\Release\twisted
creating build\temp.win-amd64-2.7\Release\twisted\test
C:\Users\Andrew\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DWIN32=1 -IC:\Users\Andrew\.virtualenvs\adventure_time\include -IC:\Users\Andrew\.virtualenvs\adventure_time\PC /Tctwisted/test/raiser.c /Fobuild\temp.win-amd64-2.7\Release\twisted/test/raiser.obj
raiser.c
C:\Users\Andrew\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:C:\Users\Andrew\.virtualenvs\adventure_time\libs /LIBPATH:C:\Users\Andrew\.virtualenvs\adventure_time\PCbuild\amd64 /EXPORT:initraiser build\temp.win-amd64-2.7\Release\twisted/test/raiser.obj /OUT:build\lib.win-amd64-2.7\twisted\test\raiser.pyd /IMPLIB:build\temp.win-amd64-2.7\Release\twisted/test\raiser.lib /MANIFESTFILE:build\temp.win-amd64-2.7\Release\twisted/test\raiser.pyd.manifest
LINK : fatal error LNK1104: cannot open file 'python27.lib'
error: command 'C:\\Users\\Andrew\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\link.exe' failed with exit status 1104
----------------------------------------
Cleaning up...
Removing temporary dir c:\users\andrew\appdata\local\temp\pip_build_Andrew...
Command C:\Users\Andrew\.virtualenvs\adventure_time\Scripts\python.exe -c "import setuptools;__file__='c:\\users\\andrew\\appdata\\local\\temp\\pip_build_Andrew\\twisted\\setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\andrew\appdata\local\temp\pip-b8elqk-record\install-record.txt --single-version-externally-managed failed with error code 1 in c:\users\andrew\appdata\local\temp\pip_build_Andrew\twisted
Exception information:
Traceback (most recent call last):
File "C:\Users\Andrew\.virtualenvs\adventure_time\lib\site-packages\pip\basecommand.py", line 134, in main
status = self.run(options, args)
File "C:\Users\Andrew\.virtualenvs\adventure_time\lib\site-packages\pip\commands\install.py", line 241, in run
requirement_set.install(install_options, global_options, root=options.root_path)
File "C:\Users\Andrew\.virtualenvs\adventure_time\lib\site-packages\pip\req.py", line 1298, in install
requirement.install(install_options, global_options, *args, **kwargs)
File "C:\Users\Andrew\.virtualenvs\adventure_time\lib\site-packages\pip\req.py", line 625, in install
cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False)
File "C:\Users\Andrew\.virtualenvs\adventure_time\lib\site-packages\pip\util.py", line 670, in call_subprocess
% (command_desc, proc.returncode, cwd))
InstallationError: Command C:\Users\Andrew\.virtualenvs\adventure_time\Scripts\python.exe -c "import setuptools;__file__='c:\\users\\andrew\\appdata\\local\\temp\\pip_build_Andrew\\twisted\\setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\andrew\appdata\local\temp\pip-b8elqk-record\install-record.txt --single-version-externally-managed failed with error code 1 in c:\users\andrew\appdata\local\temp\pip_build_Andrew\twisted
你知道我怎么可能能够确保Python是使用该编译器?我想我已经安装了这个,但Python仍然使用我的旧Visual Studio进行编译? – pyramidface