1

I have installed the Python 3 on my Windows 10 OS. Everything seemed fine. I have run some tkinter programs and they are all working fine.

I now wanted to use the numpy module for achieving a task and to my amusement I see there is no Numpy module in the Python I have installed.

I learnt that numpy module is a basic madule that should come with the python installation. Am I correct on this? If not, how can I install numpy now?

I tried installing with pip (pip install -U numpy) as suggested by one of the answers to a question in stackoverflow (3rd answer to this question - Installing SciPy with pip) but when I do I get an error:

atlas_3_10_blas_threads_info:

Setting PTATLAS=ATLAS

  libraries tatlas not found in ['C:\\Python34\\lib', 'C:\\', 'C:\\Python34\\libs']

  NOT AVAILABLE



atlas_3_10_blas_info:

  libraries satlas not found in ['C:\\Python34\\lib', 'C:\\', 'C:\\Python34\\libs']

  NOT AVAILABLE



atlas_blas_threads_info:

Setting PTATLAS=ATLAS

  libraries ptf77blas,ptcblas,atlas not found in ['C:\\Python34\\lib', 'C:\\', 'C:\\Python34\\libs']

  NOT AVAILABLE



atlas_blas_info:

  libraries f77blas,cblas,atlas not found in ['C:\\Python34\\lib', 'C:\\', 'C:\\Python34\\libs']

  NOT AVAILABLE



blas_info:

  libraries blas not found in ['C:\\Python34\\lib', 'C:\\', 'C:\\Python34\\libs']

  NOT AVAILABLE



blas_src_info:

  NOT AVAILABLE



  NOT AVAILABLE



non-existing path in 'numpy\\lib': 'benchmarks'

lapack_opt_info:

openblas_lapack_info:

  libraries openblas not found in ['C:\\Python34\\lib', 'C:\\', 'C:\\Python34\\libs']

  NOT AVAILABLE



lapack_mkl_info:

mkl_info:

  libraries mkl,vml,guide not found in ['C:\\Python34\\lib', 'C:\\', 'C:\\Python34\\libs']

  NOT AVAILABLE



  NOT AVAILABLE



atlas_3_10_threads_info:

Setting PTATLAS=ATLAS

  libraries tatlas,tatlas not found in C:\Python34\lib

  libraries lapack_atlas not found in C:\Python34\lib

  libraries tatlas,tatlas not found in C:\

  libraries lapack_atlas not found in C:\

  libraries tatlas,tatlas not found in C:\Python34\libs

  libraries lapack_atlas not found in C:\Python34\libs

<class 'numpy.distutils.system_info.atlas_3_10_threads_info'>

  NOT AVAILABLE



atlas_3_10_info:

  libraries satlas,satlas not found in C:\Python34\lib

  libraries lapack_atlas not found in C:\Python34\lib

  libraries satlas,satlas not found in C:\

  libraries lapack_atlas not found in C:\

  libraries satlas,satlas not found in C:\Python34\libs

  libraries lapack_atlas not found in C:\Python34\libs

<class 'numpy.distutils.system_info.atlas_3_10_info'>

  NOT AVAILABLE



atlas_threads_info:

Setting PTATLAS=ATLAS

  libraries ptf77blas,ptcblas,atlas not found in C:\Python34\lib

  libraries lapack_atlas not found in C:\Python34\lib

  libraries ptf77blas,ptcblas,atlas not found in C:\

  libraries lapack_atlas not found in C:\

  libraries ptf77blas,ptcblas,atlas not found in C:\Python34\libs

  libraries lapack_atlas not found in C:\Python34\libs

<class 'numpy.distutils.system_info.atlas_threads_info'>

  NOT AVAILABLE



atlas_info:

  libraries f77blas,cblas,atlas not found in C:\Python34\lib

  libraries lapack_atlas not found in C:\Python34\lib

  libraries f77blas,cblas,atlas not found in C:\

  libraries lapack_atlas not found in C:\

  libraries f77blas,cblas,atlas not found in C:\Python34\libs

  libraries lapack_atlas not found in C:\Python34\libs

<class 'numpy.distutils.system_info.atlas_info'>

  NOT AVAILABLE



lapack_info:

  libraries lapack not found in ['C:\\Python34\\lib', 'C:\\', 'C:\\Python34\\libs']

  NOT AVAILABLE



lapack_src_info:

  NOT AVAILABLE



  NOT AVAILABLE



running install

running build

running config_cc

unifing config_cc, config, build_clib, build_ext, build commands --compiler options

running config_fc

unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options

running build_src

build_src

building py_modules sources

creating build

creating build\src.win32-3.4

creating build\src.win32-3.4\numpy

creating build\src.win32-3.4\numpy\distutils

building library "npymath" sources

No module named 'numpy.distutils.msvccompiler' in numpy.distutils; trying from distutils

Running from numpy source directory.

C:\Users\Vasanth\AppData\Local\Temp\pip-build-6ru5zneo\numpy\numpy\distutils\system_info.py:1603: UserWarning:

    Atlas (http://math-atlas.sourceforge.net/) libraries not found.

    Directories to search for the libraries can be specified in the

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

    the ATLAS environment variable.

  warnings.warn(AtlasNotFoundError.__doc__)

C:\Users\Vasanth\AppData\Local\Temp\pip-build-6ru5zneo\numpy\numpy\distutils\system_info.py:1612: UserWarning:

    Blas (http://www.netlib.org/blas/) libraries not found.

    Directories to search for the libraries can be specified in the

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

    the BLAS environment variable.

  warnings.warn(BlasNotFoundError.__doc__)

C:\Users\Vasanth\AppData\Local\Temp\pip-build-6ru5zneo\numpy\numpy\distutils\system_info.py:1615: UserWarning:

    Blas (http://www.netlib.org/blas/) sources not found.

    Directories to search for the sources can be specified in the

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

    the BLAS_SRC environment variable.

  warnings.warn(BlasSrcNotFoundError.__doc__)

C:\Users\Vasanth\AppData\Local\Temp\pip-build-6ru5zneo\numpy\numpy\distutils\system_info.py:1505: UserWarning:

    Atlas (http://math-atlas.sourceforge.net/) libraries not found.

    Directories to search for the libraries can be specified in the

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

    the ATLAS environment variable.

  warnings.warn(AtlasNotFoundError.__doc__)

C:\Users\Vasanth\AppData\Local\Temp\pip-build-6ru5zneo\numpy\numpy\distutils\system_info.py:1516: UserWarning:

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

    Directories to search for the libraries can be specified in the

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

    the LAPACK environment variable.

  warnings.warn(LapackNotFoundError.__doc__)

C:\Users\Vasanth\AppData\Local\Temp\pip-build-6ru5zneo\numpy\numpy\distutils\system_info.py:1519: 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__)

C:\Python34\lib\distutils\dist.py:260: UserWarning: Unknown distribution option: 'define_macros'

  warnings.warn(msg)

error: Microsoft Visual C++ 10.0 is required (Unable to find vcvarsall.bat).

----------------------------------------
Command "C:\Python34\python.exe -c "import setuptools, tokenize;__file__='C:\\Users\\Vasanth\\AppData\\Local\\Temp\\pip-build-6ru5zneo\\numpy\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\Vasanth\AppData\Local\Temp\pip-ao3fi3xp-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Vasanth\AppData\Local\Temp\pip-build-6ru5zneo\numpy
Community
  • 1
  • 1
Vasanth Nag K V
  • 4,860
  • 5
  • 24
  • 48

1 Answers1

4

Well, as you can see, you need Microsoft Visual C++:

error: Microsoft Visual C++ 10.0 is required (Unable to find vcvarsall.bat).

This is because pip is trying to compile NumPy. Compiling packages might be not so easy, specially if you are using Windows...

But there is an alternative to pip, which you may find very convenient: Conda.

Have a look at the docs and see how you can easily:

  • Create virtual environments to use the Python interpreter you prefer.
  • Install scientific Python packages already compiled for you (including NumPy, of course).
  • Install non-scientific Python packages as well, wich may not require compilation (written in pure Python).
Peque
  • 13,638
  • 11
  • 69
  • 105
  • 3
    PS: no, Numpy is not currently considered "a basic module that should come with the python installation". It is an application-specific module and not part of the Python programming language. – Peque Oct 05 '15 at 13:00
  • 1
    had lots of problems installing modules that need compiling on Windows. Really recommend that you try Conda as answered above will save you hours of problems and get you working with a proper package that allows you different virtual environments as well. – Joop Oct 05 '15 at 13:20
  • hi Peque. i just went through some of the documentation, and i found that there is Anaconda, conda and many things.. which one should i use? need help to proceed :( – Vasanth Nag K V Oct 13 '15 at 08:25
  • @VasanthNagKV: The first paragraph in the "Using Conda / Overview" section says: *"The quickest way to start using conda is to use our Quick install guide, then run through the 30-minute Conda Test Drive, which is a shortened version of this user guide."*. The documentation is clear: you should start with [Miniconda installation](http://conda.pydata.org/docs/install/quick.html) and then go through the [test drive](http://conda.pydata.org/docs/test-drive.html) to learn how to use Conda and virtual environments. Just read the docs (do not skip anything!). ;-) – Peque Oct 13 '15 at 09:27
  • thanks but somehere i read miniconda installs just conda and its dependencies and Anaconda installs many other useful packages including conda. so had the confusion. Can we talk on skype if you are willing to? this would be a great help for me :) – Vasanth Nag K V Oct 13 '15 at 09:47
  • @VasanthNagKV: yeah, but if you want to use (clean) virtual environments, use a minimal install (miniconda) and then install required packages/modules as needed by project. :-) – Peque Oct 13 '15 at 09:48