Twissandra部署错误

时间:2014-04-22 05:13:05

标签: django python-2.7 cassandra pip

从链接中提到的步骤部署Twissandra时:https://github.com/twissandra/twissandra

我跑步时遇到错误:pip install -U -r requirements.txt

请帮忙做什么?

error: Unable to find vcvarsall.bat
----------------------------------------
Cleaning up...
  Removing temporary dir c:\users\faria\appdata\local\temp\pip_build_Faria...
Command C:\Users\Faria\Desktop\twiss\Scripts\python.exe -c "import setuptools, tokenize;__file__='c:\\users\\faria\\appdata\\local\\temp\\pip_build_Faria\\blist\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\faria\appdata\local\temp\pip-zumdku-record\install-record.txt --single-version-externally-managed --compile failed with error code 1 in c:\users\faria\appdata\local\temp\pip_build_Faria\blist
Exception information:
Traceback (most recent call last):
  File "C:\Users\Faria\Desktop\twiss\lib\site-packages\pip-1.5.4-py2.7.egg\pip\basecommand.py", line 122, in main
    status = self.run(options, args)
  File "C:\Users\Faria\Desktop\twiss\lib\site-packages\pip-1.5.4-py2.7.egg\pip\commands\install.py", line 283, in run
    requirement_set.install(install_options, global_options, root=options.root_path)
  File "C:\Users\Faria\Desktop\twiss\lib\site-packages\pip-1.5.4-py2.7.egg\pip\req.py", line 1435, in install
    requirement.install(install_options, global_options, *args, **kwargs)
  File "C:\Users\Faria\Desktop\twiss\lib\site-packages\pip-1.5.4-py2.7.egg\pip\req.py", line 706, in install
    cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False)
  File "C:\Users\Faria\Desktop\twiss\lib\site-packages\pip-1.5.4-py2.7.egg\pip\util.py", line 697, in call_subprocess
    % (command_desc, proc.returncode, cwd))
InstallationError: Command C:\Users\Faria\Desktop\twiss\Scripts\python.exe -c "import setuptools, tokenize;__file__='c:\\users\\faria\\appdata\\local\\temp\\pip_build_Faria\\blist\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\faria\appdata\local\temp\pip-zumdku-record\install-record.txt --single-version-externally-managed --compile failed with error code 1 in c:\users\faria\appdata\local\temp\pip_build_Faria\blist

1 个答案:

答案 0 :(得分:2)

您偶然发现了Windows用户在尝试使用python时遇到的最常见问题:

由于Windows默认情况下没有正确的编译环境,并且安装这样的环境就像在Linux中一样简单,因此无法编译包含本机代码的软件包。

解决方法是尝试为您的体系结构和python版本找到有问题的包的预编译二进制文件。实际上,根据您的要求(blist),加州大学欧文分校荧光动力学实验室的Christoph Gohlke已经创建了一个预编译的二进制文件:

http://www.lfd.uci.edu/~gohlke/pythonlibs/#blist

所以只需下载正确的软件包并运行,例如easy_install blist‑1.3.6.win32‑py2.7.exe(如果你有32位的python 2.7版本)。

当然您也可以尝试安装自己的开发环境,例如以下说明:Building Python C extension modules for Windows - 我已经使用VS Express完成了它并且工作正常,但需要下载一个大包装,并在我的Windows机器上安装各种东西。