2

I am trying to follow this tutorial and getting an error when I do the following:

(DataVizProject) $ pip install -r requirements.txt

It gives me a big error log, the last few lines of which are :

C:\python\new-coder\dataviz\DataVizProj\build\numpy\numpy\distutils\system_info.
py:1422: UserWarning:

    Lapack (http://www.netlib.org/lapack/) sources not found.

    Directories to search for the sources can be specified in the

    numpy/distutils/site.cfg file (section [lapack_src]) or by setting

    the LAPACK_SRC environment variable.

  warnings.warn(LapackSrcNotFoundError.__doc__)

error: Unable to find vcvarsall.bat

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in C:\python\new-coder
\dataviz\DataVizProj\build\numpy

I know it doesn't work because when I do the following steps:

>>> import numpy
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named numpy
>>> import matplotlib
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named matplotlib
>>>

Thanks a lot!

Has
  • 885
  • 4
  • 13
  • 31
  • Why don't you read the error message? "Lapack (http://www.netlib.org/lapack/) sources not found.". Install Lapack and you'll probably be fine. – tamasgal Sep 10 '13 at 23:48
  • 1
    Your other issue (`unable to find vcvarsall.bat`) has also been addressed before on this site, many times. Depending on the exact root cause, you may be able to find help [here](http://stackoverflow.com/questions/2667069), [here](http://stackoverflow.com/questions/2817869), [here](http://stackoverflow.com/questions/3047542), or [here](http://stackoverflow.com/questions/6551724)... – Mac Sep 10 '13 at 23:59

3 Answers3

5

@Hasnain, when you are using python in windows, eventually you will see this error for some packages.

You have three options when it happen (in order of relevance):

1 - Try to download a MSI file. It will install the library without any problems. To numpy specifically you can download here (http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy)

2 - You can download the whole file and try a python setup.py install and modify the packacge if it raise some errors.

3 - You can compile your own library for your operational system.

Many MSI files you can find here (http://www.lfd.uci.edu/~gohlke/pythonlibs/)

Fernando Freitas Alves
  • 3,709
  • 3
  • 26
  • 45
2

The method recommended in that tutorial works well for Unix systems. If you are on Windows you will go through a lot of trouble trying to build numpy from sources with pip. I will save you some time, follow the official recomendation and try some binary install of the recommended ones in the official Scipy website. I personally recommend you the Anaconda or the Enthought distribution.

elyase
  • 39,479
  • 12
  • 112
  • 119
1

Usually when installing packages on windows, by default python searches for Visual Studio 2008 . You can either install it or use MinGW Compiler.

If you decide to use MinGW you should edit your distutils.cfg file in Python27\Lib\distutils directory :

[build]
compiler = mingw32

[build_ext]
compiler = mingw32
Alexander
  • 12,424
  • 5
  • 59
  • 76