Error: Microsoft Visual C++ 10.0 is required (Unable to find vcvarsall.bat) when running Python script
I got the same error and ended up using a pre-built distribution of numpy available in SourceForge (similarly, a distribution of matplotlib can be obtained).
Builds for both 32-bit 2.7 and 3.3/3.4 are available.
PyCharm detected them straight away, of course.
Microsoft Visual C++ 10.0 is required (Unable to find vcvarsall.bat)
I just did the following steps and was able to install the extension via pip. I'm working on Windows 8.1 x64.
Install latest Python 3 version using the x86 installer. (x64 is more difficult because VS doesn't include a compiler for x64, see second answer here)
Install Visual C++ Studio 2010 Express which can be downloaded from Microsoft (follow this link, the visual studio 2010 downloads are at the bottom of the page. You need to download the C++ release and i think you have to register at Microsoft to be able to download the software).
Run
py -3 -m pip install ephem
to istall ephem. (py -3 -m pip
calls pip from your python 3 installation, helpful if you also have python 2 installed)
Worked for me without any problems.
Update 2017:
See the following link that contains information on compiling python on windows:
https://wiki.python.org/moin/WindowsCompilers
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
Related Topics
Tkinter Grid_Forget Is Clearing the Frame
Prepend a Level to a Pandas Multiindex
Difference Between Data and JSON Parameters in Python Requests Package
Can Pandas Plot a Histogram of Dates
List of All Available Matplotlib Backends
Too Many Values to Unpack Calling Cv2.Findcontours
Import Script from a Parent Directory
Pivot String Column on Pyspark Dataframe
Using Numpy Vectorize on Functions That Return Vectors
Interact with Other Programs Using Python
Nameerror: Global Name 'Xrange' Is Not Defined in Python 3
How to Append to the End of an Empty List
Pandas Equivalent of Oracle Lead/Lag Function
Unicodeencodeerror: 'Ascii' Codec Can't Encode Character at Special Name