0
votes

while deploying Twissandra from the steps mentioned in the link: https://github.com/twissandra/twissandra

I am getting an error when I run : pip install -U -r requirements.txt

Please help what to do?

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

1 Answers

2
votes

You have stumbled to the most common problem Windows users face when trying to use python:

Since Windows by default doesn't have a proper compile environment, and installing such an environment is not as easy as in Linux, packages that contain native code cannot be compiled.

The solution to this is to try to find pre-compiled binaries of the offending package for your architecture and python version. Fortuanately, for your requirement (blist), Christoph Gohlke at the Laboratory for Fluorescence Dynamics, University of California, Irvine has already created a pre-compiled binary:

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

So just download the correct package and run, for instance easy_install blist‑1.3.6.win32‑py2.7.exe (if you got the 32-bit, python 2.7 version).

Of course you can also try installing your own development environment, following, for instance the instructions found here: Building Python C extension modules for Windows -- I've done it with VS Express and it worked fine, however it required downloading a big package and installing various things on my Windows box.