-1

I know that this topic has been covered time and time again but I am facing a lot of difficulty. I have already installed the Visual C++ compiler for Python 2.7 and added the path to the batch file in my system path. For some reason, I still can't find it when compiling C based packages installed with pip. I've tried the redistributable approach as well to no avail. I've even tried overwriting the function that find the file from a distutils script with a direct path, and it tells me that access is denied. What can I do?

Malik Brahimi
  • 16,341
  • 7
  • 39
  • 70
  • 1
    you need to install the specific vs c++ that it was compiled against (I think its usually 2008) .... it can be really painful (you might have to set some path variables as well) ... have you looked for a precompiled version? *.whl or installer.exe ? – Joran Beasley Mar 24 '15 at 15:43
  • I'm really looking for a minimalist approach. You can use Visual Studio or the redistributable. I wish to used the latter. But shouldn't the Python C++ compiler suffice? – Malik Brahimi Mar 24 '15 at 15:45
  • Dup http://stackoverflow.com/questions/2817869/error-unable-to-find-vcvarsall-bat – Sergei Nikulov Mar 24 '15 at 15:46
  • @Sergey I seen every last post on the matter. As I said, I don't want to install the entire Visual Studio. I want a minimalist installation, space on my machine is limited. – Malik Brahimi Mar 24 '15 at 15:50
  • then find precompiled installers for your package ... I know getting the build environment configured on windows is painful ... and you need the full vsc++ installation for the exact version the python you are using was built with – Joran Beasley Mar 24 '15 at 15:53
  • Then restate your question. For example - how can I install MSVC++ to hdd with N Mb free, where N is your free space. Perhaps you should switch to Linux :-) – Sergei Nikulov Mar 24 '15 at 16:28
  • @JoranBeasley I've discovered the problem see below. – Malik Brahimi Mar 24 '15 at 17:18
  • @Sergey Same thing for you Sergey. I figured it out below. – Malik Brahimi Mar 24 '15 at 17:19
  • @MalikBrahimi good job :) glad to hear it :) – Joran Beasley Mar 24 '15 at 17:19

1 Answers1

1

Never mind, I've discovered the issue in a bug report for Python 2.7.9. There is a workaround contained within the listing. Thank you to those that tried to help me solve the problem:

1) Enter MSVC for Python command prompt
2) SET DISTUTILS_USE_SDK=1
3) SET MSSdk=1
4) python.exe setup.py ...
Malik Brahimi
  • 16,341
  • 7
  • 39
  • 70