Подтвердить что ты не робот

Как установить numpy с pip + mingw в windows?

У меня есть pip + mingw, работающий в окнах. Я протестировал его с помощью

pip install cython

и он отлично работает.

pip install numpy

не работает с длинным списком сообщений об ошибках. Каков правильный способ сделать это, или я должен отказаться от попытки с помощью pip?

Downloading/unpacking numpy
  Running setup.py egg_info for package numpy
    non-existing path in 'numpy\\distutils': 'site.cfg'
    F2PY Version 2
    blas_opt_info:
    blas_mkl_info:
      libraries mkl,vml,guide not found in ['C:\\Python27\\lib', 'C:\\', 'C:\\Python27\\libs']
      NOT AVAILABLE

    atlas_blas_threads_info:
    Setting PTATLAS=ATLAS
      libraries ptf77blas,ptcblas,atlas not found in ['C:\\Python27\\lib', 'C:\\', 'C:\\Python27\\libs']
      NOT AVAILABLE

    atlas_blas_info:
      libraries f77blas,cblas,atlas not found in ['C:\\Python27\\lib', 'C:\\', 'C:\\Python27\\libs']
      NOT AVAILABLE

    blas_info:
      libraries blas not found in ['C:\\Python27\\lib', 'C:\\', 'C:\\Python27\\libs']
      NOT AVAILABLE

    blas_src_info:
      NOT AVAILABLE

      NOT AVAILABLE

    lapack_opt_info:
    lapack_mkl_info:
    mkl_info:
      libraries mkl,vml,guide not found in ['C:\\Python27\\lib', 'C:\\', 'C:\\Python27\\libs']
      NOT AVAILABLE

      NOT AVAILABLE

    atlas_threads_info:
    Setting PTATLAS=ATLAS
      libraries ptf77blas,ptcblas,atlas not found in C:\Python27\lib
      libraries lapack_atlas not found in C:\Python27\lib
      libraries ptf77blas,ptcblas,atlas not found in C:\
      libraries lapack_atlas not found in C:\
      libraries ptf77blas,ptcblas,atlas not found in C:\Python27\libs
      libraries lapack_atlas not found in C:\Python27\libs
    numpy.distutils.system_info.atlas_threads_info
      NOT AVAILABLE

    atlas_info:
      libraries f77blas,cblas,atlas not found in C:\Python27\lib
      libraries lapack_atlas not found in C:\Python27\lib
      libraries f77blas,cblas,atlas not found in C:\
      libraries lapack_atlas not found in C:\
      libraries f77blas,cblas,atlas not found in C:\Python27\libs
      libraries lapack_atlas not found in C:\Python27\libs
    numpy.distutils.system_info.atlas_info
      NOT AVAILABLE

    lapack_info:
      libraries lapack not found in ['C:\\Python27\\lib', 'C:\\', 'C:\\Python27\\libs']
      NOT AVAILABLE

    lapack_src_info:
      NOT AVAILABLE

      NOT AVAILABLE

    build_src
    building py_modules sources
    building library "npymath" sources
    No module named msvccompiler in numpy.distutils; trying from distutils
    Running from numpy source directory.
    c:\users\marshall\appdata\local\temp\pip-build-marshall\numpy\numpy\distutils\system_info.py:1494: 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\marshall\appdata\local\temp\pip-build-marshall\numpy\numpy\distutils\system_info.py:1503: 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\marshall\appdata\local\temp\pip-build-marshall\numpy\numpy\distutils\system_info.py:1506: 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\marshall\appdata\local\temp\pip-build-marshall\numpy\numpy\distutils\system_info.py:1408: 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\marshall\appdata\local\temp\pip-build-marshall\numpy\numpy\distutils\system_info.py:1419: 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\marshall\appdata\local\temp\pip-build-marshall\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
    Complete output from command python setup.py egg_info:
    non-existing path in 'numpy\\distutils': 'site.cfg'

F2PY Version 2

blas_opt_info:

blas_mkl_info:

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

  NOT AVAILABLE



atlas_blas_threads_info:

Setting PTATLAS=ATLAS

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

  NOT AVAILABLE



atlas_blas_info:

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

  NOT AVAILABLE



blas_info:

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

  NOT AVAILABLE



blas_src_info:

  NOT AVAILABLE



  NOT AVAILABLE



lapack_opt_info:

lapack_mkl_info:

mkl_info:

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

  NOT AVAILABLE



  NOT AVAILABLE



atlas_threads_info:

Setting PTATLAS=ATLAS

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

  libraries lapack_atlas not found in C:\Python27\lib

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

  libraries lapack_atlas not found in C:\

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

  libraries lapack_atlas not found in C:\Python27\libs

numpy.distutils.system_info.atlas_threads_info

  NOT AVAILABLE



atlas_info:

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

  libraries lapack_atlas not found in C:\Python27\lib

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

  libraries lapack_atlas not found in C:\

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

  libraries lapack_atlas not found in C:\Python27\libs

numpy.distutils.system_info.atlas_info

  NOT AVAILABLE



lapack_info:

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

  NOT AVAILABLE



lapack_src_info:

  NOT AVAILABLE



  NOT AVAILABLE



running egg_info

running build_src

build_src

building py_modules sources

building library "npymath" sources

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

Running from numpy source directory.

c:\users\marshall\appdata\local\temp\pip-build-marshall\numpy\numpy\distutils\system_info.py:1494: 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\marshall\appdata\local\temp\pip-build-marshall\numpy\numpy\distutils\system_info.py:1503: 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\clifford\appdata\local\temp\pip-build-clifford\numpy\numpy\distutils\system_info.py:1506: 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\clifford\appdata\local\temp\pip-build-clifford\numpy\numpy\distutils\system_info.py:1408: 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\clifford\appdata\local\temp\pip-build-clifford\numpy\numpy\distutils\system_info.py:1419: 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\clifford\appdata\local\temp\pip-build-clifford\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
4b9b3361

Ответ 1

pip строит Numpy из источника и это вполне обязательство. Ошибка в конце говорит мне, что у вас может не быть надлежащим образом настроен ваш компилятор для distutils. Я сам использую компилятор Windows SDK: http://www.microsoft.com/en-us/download/details.aspx?id=8279

Если вы используете этот, вы должны определить переменные среды:

set MSSdk=1
set DISTUTILS_USE_SDK=1

Сказав это, гораздо проще установить Numpy и Scipy с помощью одного из установщиков .msi, которые вы можете найти здесь: http://scipy.org/Download, Numpy полагается на библиотеки линейной алгебры BLAS, а их сборка является высокотехнологичной, и сборку Numpy из источника в Windows лучше избегать, если у вас нет веских оснований для этого.