-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Append a user-friendly message after 'Unable to find vcvarsall.bat' explaining how to fix the problem #942
Comments
I'd like to bump this, it's really annoying and causes great pain to those that just want to use python without having to depend on a C compiler |
That message comes from Python's distutils. You need to file a request at http://bugs.python.org if you want this changed. |
Reported upstream at Python.org http://bugs.python.org/issue2943 please vote for it. If you feel strongly, make a |
The message appears even if you have a C compiler... Here I found the best answer: http://stackoverflow.com/questions/2667069/cannot-find-vcvarsall-bat-when-running-a-python-script Python is not recognizing newer versions of Visual Studio |
Hi, Does anyone know how I can get past this error so that I can install only NumPy and not have to download Enthought or Anaconda packages? Thanks. |
@jerusalemprogrammer the easiest way to install Numpy on vanilla Python is the Windows installers at http://www.lfd.uci.edu/~gohlke/pythonlibs/ |
Hi Mr. Hickford, Thanks for the prompt reply. I have seen these referred to - but am suspicious of third-party software Are there any other solutions? I read that Python needed C compiler, so it was recommended to download Do you know of any other solution? Thanks. kindest regards, On Tue, Dec 23, 2014 at 11:57 AM, Matt Hickford notifications@github.com
|
Yes there is a solution:
Steps 2 to 4 must be reproduced everytime before building your C extensions. This is because of an issue with the VCForPython27.msi which install the header files and vcvarsall.bat in folders of a different layout than the VS2008 SDK and thus confuse the compiler detection of distutils. This will get fixed in setuptools in Python 2.7.10. Bug report and workaround by Gregory Szorc: |
Irq3000... your directions are not simple and clear enough for me. Enter MSVC where? Where and how am I doing these things?... I downloaded that, I am still without a clue. |
@MikeTam1021 More up to date info can now be found here: In particular, you can just import setuptools instead of distutils and this should correctly load the VCForPython27 compiler. Else if you really want to use the commands I described above, you just have to set them in a console, so just run |
thanks Irq3000, that worked |
There are millions of Python developers on Windows. They would like to use libraries. If they succeed in installing pip, this is typically their first experience with it:
And often their last. That cryptic message "Unable to find vcvarsall.bat" is meaningless to most people, and sends users on a fool's errand (trying to download a file called
vcvarsall.bat
).Ideally, package management would work out the box but if that can't be done, it would be courteous to make the error more user-friendly with instructions how to actually fix the problem. I suggest
For comparison, Ruby ships with a package manager, Gem. If a user tries to install a package with C extensions but doesn't have a C compiler installed, they are given this user-friendly message:
The text was updated successfully, but these errors were encountered: