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:
- Right click on My Computer.
- Click Properties
- Advanced system settings
- Environment variables
- Add New system variable
- Enter VS90COMNTOOLS to the variable name
- Enter the value of current version to the new variable.
- 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
Python Global Exception Handling
Link Atlas/Mkl to an Installed Numpy
How to Make a 4D Plot with Matplotlib Using Arbitrary Data
Matplotlib Axes.Plot() VS Pyplot.Plot()
Matplotlib Log Scale Tick Label Number Formatting
What Is a '"Python"' Layer in Caffe
How to Decorate an Instance Method with a Decorator Class
Numpy.Unique with Order Preserved
How to Display a Pandas Data Frame with Pyqt5/Pyside2
Query for List of Attribute Instead of Tuples in SQLalchemy
How to Load Files Using Pickle and Multiple Modules
How to Determine the Length of Lists in a Pandas Dataframe Column
Get Previous Row's Value and Calculate New Column Pandas Python