2

I'm currently running Python 3.4 on Windows 8.1 using PyCharm Community 5.0.3 and I've been running into the following error when I try to install libraries with C dependencies (ie pymssql):

error: Microsoft Visual C++ 10.0 is required (Unable to find vcvarsall.bat)

I've gone through various Stack Overflow responses to similar situations but haven't been able to find a viable answer as most of the questions are for Python 2.7. The main response I have found is to re-download Visual Studio 10, which I haven't been able to find at all on the web.

Any insight into this matter would be great.

Cœur
  • 37,241
  • 25
  • 195
  • 267
lacriosa
  • 21
  • 2
  • See also http://stackoverflow.com/q/2817869/284795 – Colonel Panic Feb 17 '16 at 14:11
  • @ColonelPanic I tried doing what was recommended in that post but it still resulted in an error. – lacriosa Feb 17 '16 at 14:18
  • here's the same situation solved, maybe it would help you? http://stackoverflow.com/questions/28251314/error-microsoft-visual-c-10-0-is-required-unable-to-find-vcvarsall-bat – noise Feb 17 '16 at 14:21
  • @noise It doesn't look like there's a prebuilt distribution of pymssql available. I did try installing a .whl version of the library but it failed to install. – lacriosa Feb 17 '16 at 14:36

1 Answers1

0

First of all you can Download Microsoft Visual 2013 Redistributable Packages from this link

You can also use Mingw as a compiler for python 2.x and also for 3.x

check this documentation : https://docs.python.org/2.7/install/#gnu-c-cygwin-mingw

This allows you to have compiler to build your extensions for your python,to use mingw as a compiler for python you have to :

1-install mingw32 to **C:\programs\mingw**

2-Add mingw32's bin directory to your environment variable: append c:\programs\MinGW\bin; to the PATH

3-Edit (create if not existing) distutils.cfg file located at C:\Python2\Lib\distutils\distutils.cfg to be:

[build]
compiler=mingw32

Now run easy_install.exe to install any module using c or c++ extensions :)