emeryville
emeryville

Reputation: 372

Python3.5 - error: Unable to find vcvarsall.bat

My problem is not new and occurred to others with the same error (Unable to find vcvarsall.bat), while installing 'lxml'. I use Python 3.5 and windows 7. I tried to follow the recommended steps here but failed

  1. I installed mingw32 to C:\programs\mingw\

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

I went wrong here. May you explain me (simply) how to add mingw32's bin directory to the path?

  1. Edit (create if not existing) distutils.cfg file located at C:\Python35\Lib\distutils\distutils.cfg to be:

    [build]

    compiler=mingw32

I didn't get this step at all.

  1. Now run pip install lxml.

I got this one and I made sure the environment was set by opening a new cmd.exe.

Any advice to complete these steps would be greatly appreciated.

Upvotes: 0

Views: 2623

Answers (2)

Javier Alvarez
Javier Alvarez

Reputation: 41

I should install Microsoft Visual C++ Compiler for Python 2.7 from ... https://www.microsoft.com/en-us/download/confirmation.aspx?id=44266

Upvotes: 1

lbg
lbg

Reputation: 7

I think installing mingw32 is not a good idea. Please follow these setps:

  1. check your Python's versions, 3.4 will be easy to install;
  2. download the whl and use pip install command;
  3. go to http://www.lfd.uci.edu/~gohlke/pythonlibs/ where you'll find the file as your wish.

Upvotes: 1

Related Questions