unable to find vcvarsall.bat

System: PyCharm 2.7.2; Python 2.7.5; Visual Studio 10.0

Hello -

I am trying to update numpy from 1.5.1 to 1.7.1 via the Settings window in PyCharm (File->Settings->Python Interpreters).  (I successfully updated networkx a few moments ago.)

When I try to update numpy, I eventually get an error message "Unable to find vcvarsall.bat".  However that file exists in C:\Program Files (86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat.

Any insight on this would be appreciated.  Thank you.

Best,
David
8 comments
Comment actions Permalink
Dear David,
Did you ever fix this problem?
0
Comment actions Permalink
Try starting a Visual Studio 2010 command prompt and then run your pip update from there. If you are using a virtual env (and you probably should) then activate it before running:

pip install --upgrade numpy
prettyPrint();
0
Comment actions Permalink
I have same issues. That does not work either.
0
Comment actions Permalink
See http://stackoverflow.com/questions/3047542/building-lxml-for-python-2-7-on-windows You can't use Visual Studio 2010 to compile Python C extension module - you have to use Visual Studio 2008 or new Microsoft Visual C++ Compiler for Python 2.7 available at http://www.microsoft.com/en-us/download/details.aspx?id=44266
0
Comment actions Permalink
Thank you for the information, Piotr.  I downloaded and installed the VC++ Compiler from the link you gave me.  Unfortunately that did not solve the problem.  Do you have any other suggestions?  At this point I may have to switch away from PyCharm.

Best regards,
David
0
Comment actions Permalink
It might not be sufficient to simply install the compiler and then run the package update from within PyCharm.

Does your environment have setuptools 6.0 or higher as mentioned in the Microsoft page for the compiler?

I'm not using that compiler edition (I have VS 2008) but I think you might still need to open a Visual Studio command prompt, or manually run their environment setup script at a prompt, in order to set up the necessary environment for the numpy package to compile.  Once you have done that, run the pip upgrade at that prompt:

    pip install --upgrade numpy
prettyPrint();
If that still doesn't work you might try to obtain a binary package that's already compiled such as from here.
0
Comment actions Permalink
Thank you for the assistance, Preston.  Indeed I did not have the latest version of setuptools installed.  It was my oversight in reading the information on the MS page.  I appreciate your patience.

Now I can get back to coding.  :-)

Best regards,
David
0
Comment actions Permalink

I have the same issue but I am able to compile cython file (.pyx) from VS command line but not from PyCharm if I use pyximport. I get the above error. Any ideas what could be the issue?

0

Please sign in to leave a comment.