2017-02-09 14 views
-1

Как установить пакет scipy для Python2.7 в Windows 10? Я получаю эту ошибку:установка scipy пакета для Windows 10

PS D:\simcut> C:\Python27\Scripts\pip.exe install scipy 
Collecting scipy 
    Using cached scipy-0.18.1.tar.gz 
Installing collected packages: scipy 
    Running setup.py install for scipy ... error 
    Complete output from command c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\mona\\appdata\\local\\tem 
p\\pip-build-6oexav\\scipy\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(comp 
ile(code, __file__, 'exec'))" install --record c:\users\mona\appdata\local\temp\pip-vtfkqm-record\install-record.txt --single-version-ext 
ernally-managed --compile: 

    Note: if you need reliable uninstall behavior, then install 
    with pip instead of using `setup.py install`: 

     - `pip install .`  (from a git repo or downloaded source 
           release) 
     - `pip install scipy` (last SciPy release on PyPI) 


    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 

    c:\python27\lib\site-packages\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__) 
    lapack_info: 
     libraries lapack not found in ['c:\\python27\\lib', 'C:\\', 'c:\\python27\\libs'] 
     NOT AVAILABLE 

    c:\python27\lib\site-packages\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__) 
    lapack_src_info: 
     NOT AVAILABLE 

    c:\python27\lib\site-packages\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__) 
     NOT AVAILABLE 

    Running from scipy source directory. 
    Traceback (most recent call last): 
     File "<string>", line 1, in <module> 
     File "c:\users\mona\appdata\local\temp\pip-build-6oexav\scipy\setup.py", line 415, in <module> 
     setup_package() 
     File "c:\users\mona\appdata\local\temp\pip-build-6oexav\scipy\setup.py", line 411, in setup_package 
     setup(**metadata) 
     File "c:\python27\lib\site-packages\numpy\distutils\core.py", line 152, in setup 
     config = configuration() 
     File "c:\users\mona\appdata\local\temp\pip-build-6oexav\scipy\setup.py", line 335, in configuration 
     config.add_subpackage('scipy') 
     File "c:\python27\lib\site-packages\numpy\distutils\misc_util.py", line 1003, in add_subpackage 
     caller_level = 2) 
     File "c:\python27\lib\site-packages\numpy\distutils\misc_util.py", line 972, in get_subpackage 
     caller_level = caller_level + 1) 
     File "c:\python27\lib\site-packages\numpy\distutils\misc_util.py", line 909, in _get_configuration_from_setup_py 
     config = setup_module.configuration(*args) 
     File "scipy\setup.py", line 15, in configuration 
     config.add_subpackage('linalg') 
     File "c:\python27\lib\site-packages\numpy\distutils\misc_util.py", line 1003, in add_subpackage 
     caller_level = 2) 
     File "c:\python27\lib\site-packages\numpy\distutils\misc_util.py", line 972, in get_subpackage 
     caller_level = caller_level + 1) 
     File "c:\python27\lib\site-packages\numpy\distutils\misc_util.py", line 909, in _get_configuration_from_setup_py 
     config = setup_module.configuration(*args) 
     File "scipy\linalg\setup.py", line 20, in configuration 
     raise NotFoundError('no lapack/blas resources found') 
    numpy.distutils.system_info.NotFoundError: no lapack/blas resources found 

    ---------------------------------------- 
Command "c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\mona\\appdata\\local\\temp\\pip-build-6oexav\\sci 
py\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exe 
c'))" install --record c:\users\mona\appdata\local\temp\pip-vtfkqm-record\install-record.txt --single-version-externally-managed --compil 
e" failed with error code 1 in c:\users\mona\appdata\local\temp\pip-build-6oexav\scipy\ 

Я могу установить другие пакеты, такие как networkx, используя network installx.

ответ

3

Есть два способа:

сайт SciPy состояния:

Windows does not have any package manager analogous to that in Linux, so installing one of the scientific Python distributions mentioned above is preferred. However, if that is not an option, Christoph Gohlke provides pre-built Windows installers for many Python packages, including all of the core SciPy stack, which work extremely well.

  1. Таким образом Вы можете скачать .whl из here и сделать C:\Python27\Scripts\pip.exe install <wheel name>. Примечание. Убедитесь, что .whl находится в том же каталоге, что и pip.
  2. Если это не работает:

See the easiest solution is to unzip the .whl file using 7-zip. Then in the unzipped directory you will find the module which you can copy and paste in the directory C:/Python34/Lib/site-packages/ (or wherever else you have installed Python).

Вторая точка из this SO ответить

[EDIT]

Дружественного Примечание: используйте win-bash (с обновления юбилейного), это действительно хорошо.

+0

'PS D: \ simcut> C: \ Python27 \ Scripts \ pip.exe install. \ Scipy-0.18.1-cp27-cp27m-win32.whl Обработка d: \ simcut \ scipy-0.18.1-cp27 -cp27m-win32.whl Установка собранных пакетов: scipy Успешно установлен scipy-0.18.1 PS D: \ simcut> python Python 2.7.5 (по умолчанию, 15 мая 2013 г., 22:43:36) [MSC v. 1500 32 бит (Intel)] на win32 Введите «help», «copyright», «credits» или «license» для получения дополнительной информации. ' –

+0

' >>> import scipy Traceback (последний последний звонок): Файл " ", строка 1, in Файл" C: \ Python27 \ lib \ site-packages \ scipy \ __ init__.py ", строка 61, в from numpy._distributor_init import NUMPY_MKL # требует numpy + mkl ImportError: Нет модуля с именем _distributor_init' –

+0

У вас есть «numpy»? Иначе установите то же самое. –

0

Я считаю, что самый простой способ заставить Scipy работать в Windows - получить WinPython.