Setting up Visual C++ for Python via /r/learnprogramming

Setting up Visual C++ for Python

hi guys, I have a problem with setting up Visual C++ for python, which I am unable to solve for a couple of days already.

I want to install some scientific software via pip. Pip tells me it cant install the software because it needs "Microsof Visual C++" while trying to install some dependencies of that software (pycifrw and spglib). The error message is:

error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools":

additionally there is this text, which seems to be the command provoking the error:

Command "C:\ProgramData\Anaconda3\python.exe -u -c "import setuptools, tokenize;file='C:\Users\user\AppData\L ocal\Temp\pip-build-21fv30va\spglib\'; f=getattr(tokenize, 'open', open)(file);'\r\n','\n'); f.close() exec(compile(code, file, 'exec'))" install –record C:\Users\user\AppData\Local\Temp\pip-x_kflgit-record\install-record.txt –single-version-externally-managed –compile" failed with error code 1 in C:\Users\user\AppData\Loca\Temp\pip-build-21fv30va\spglib\

So I simply tried to install Visual C++ from the suggested website but it didnt work I still get the same error message. So I tried installing Visual Studio in general with all packages that seemed remotely related to either python or C++. But there seems to be something wrong with the installation, it never creates the C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC folder which is supposed to contain the cl.exe(according to the internet). After some search i found the cl.exe somewhere else in C:\Program Files (x86)\Microsoft Visual Studio… and so on somewehere deep down. So I changed the enviromental variables PATH, INCLUDE and LIBPATH to that folder, but I'm not sure if that was a good idea. So the PowerShell finds cl.exe now, but it doesnt help. Pip still complaints that there is no Visual C++.

Im not very familiar with Windows, so there is possibly something obvious Im not realising. Maybe someone here can help me.

The OS is Win8.1, and the Python distribution is Anaconda3.

Submitted July 12, 2017 at 03:00PM by lalilu123
via reddit


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s