Python installation error: NumPy package

python

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!

Best Answer

@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/)