ditoslav
ditoslav

Reputation: 4892

Do I really need Visual Studio 2010 for PIP to work or can I install 2013/2015 and it will work?

When using PIP for the first time I got an error while installing bokeh

C:\Python34\lib\distutils\dist.py:260: UserWarning: Unknown distribution option: 
   'define_macros'
warnings.warn(msg)
error: Microsoft Visual C++ 10.0 is required (Unable to find vcvarsall.bat).

I have Dreamspark Premium so I can install anything I want but I do not want to clog my pc with various versions of the same product so if I can I'd rather install a newer version of VS. Will this error get fixed even with a newer install of VS?

EDIT: I installed VS2015 and it still doesn't work. Also, I tried adding the vcvarsall.bat to path and copying it to common7/tools and that didn't help as well. I also have a 2010 c++ redistributable installed from before I even got this problem but it still doesn't seem to see it...

Upvotes: 1

Views: 735

Answers (1)

Zooba
Zooba

Reputation: 11458

The easiest way to solve this is to install a copy of Visual Studio 2010 (agreed - not a great solution). Because Python 3.4 was built with that version, you also need that version to build extensions. However, most packages have other dependencies, and so building from source should generally considered to be a significant investment and you really should just find a prebuilt version.

For bokeh, you could look into using Anaconda instead of a normal Python installation, as that will include an already built version, or there are some other suggestions listed on the PTVS page (that don't require you to use PTVS).

Also, as people migrate to Python 3.5, the compiler required will be Visual Studio 2015, so you're already set up for that. However, many packages will need some changes to build with the newer compiler, so there may be some delay before everything works again.

Upvotes: 1

Related Questions