How to Point Easy_Install to Vcvarsall.Bat

How do I point easy_install to vcvarsall.bat?

I'd still like to know where to set that reference to vsvarsall.bat...

Well, as martineau wrote you have to have either Visual Studio 2008 or Visual C++ Express installed. Having said that I understand you would like to know where Python looks for this batch file. You can see this by looking at definition of find_vcvarsall function in distutils/msvc9compiler.py standard module. Python checks in turn if any of folders saved in the registry under keys

  • HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\VisualStudio\9.0\Setup\VC\ProductDir
  • HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\VCExpress\9.0\Setup\VC\ProductDir

(for 64bit Windows) or

  • HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\9.0\Setup\VC\ProductDir
  • HKEY_LOCAL_MACHINE\Software\Microsoft\VCExpress\9.0\Setup\VC\ProductDir

(for 32bit Windows) exists and if so it treats such folder as the one containing vcvarsall.bat file. If none of these folders exists Python checks if there's environment variable VS90COMNTOOLS. If this variable exits Python treats folder two levels above value of this variable as the folder containing vcvarsall.bat file.

See also my other answer which explains why you can't use MSVC++ 2010 to build extensions for Python 2.6

EDIT:
The VC++ 2008 files are now packaged in an installer from MS which can be downloaded here. Once installed vcvarsall.bat will be in C:\Users\username\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0

pip install gives error: Unable to find vcvarsall.bat

You could use ol' good easy_install zipline instead.

easy_install isn't pip but one good aspect of it is the ability to download and install binary packages too, which would free you for the need having VC++ ready. This of course relies of the assumption that the binaries were prepared for your Python version.

UPDATE:

Yes, Pip can install binaries now!

There's a new binary Python archive format (wheel) that is supposed to replace "eggs". Wheels are already supported by pip. This means you'll be able to install zipline with pip without compiling it as soon as someone builds the wheel for your platform and uploads it to PyPI.

Python Pip install Error: Unable to find vcvarsall.bat. Tried all solutions

I have tried all suggestions and found my own simple solution.

The problem is that codes written in external environment like C need compiler. Look for its own VS environment, i.e. VS 2008.

Currently my machine runs VS 2012 and faces Unable to find vcvarsall.bat.
I studied codes that i want to install to find the VS version. It was VS 2008. i have add to system variable VS90COMNTOOLS as variable name and gave the value of VS120COMNTOOLS.

You can find my step by step solution below:

  1. Right click on My Computer.
  2. Click Properties
  3. Advanced system settings
  4. Environment variables
  5. Add New system variable
  6. Enter VS90COMNTOOLS to the variable name
  7. Enter the value of current version to the new variable.
  8. Close all windows

Now open a new session and pip install your-package

error: Unable to find vcvarsall.bat to compile python modules with Visual Studio 2008 installed

Python 3.3 on Windows is built with VS2010, which doesn't match your VS2008. Previous versions of Python did indeed use VS2008.

You'll need to get hold of VS2010.



Related Topics



Leave a reply



Submit