想知道是否有人遇到過類似的問題並且已經有解決方案?使用Windows 7Windows上的SciPy與Python 2.7安裝問題
C:\Python27\Scripts>pip install SciPy
Collecting SciPy
Using cached scipy-0.18.0.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\\foo\\appdata\\local\\temp\\pip-build-r3jpxr\\
SciPy\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().r
eplace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\foo\appda
ta\local\temp\pip-efo9to-record\install-record.txt --single-version-externally-m
anaged --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:
openblas_lapack_info:
libraries openblas not found in ['c:\\python27\\lib', 'C:\\', 'c:\\python2
7\\libs']
NOT AVAILABLE
lapack_mkl_info:
mkl_info:
libraries mkl,vml,guide not found in ['c:\\python27\\lib', 'C:\\', 'c:\\py
thon27\\libs']
NOT AVAILABLE
NOT AVAILABLE
atlas_3_10_threads_info:
Setting PTATLAS=ATLAS
c:\python27\lib\site-packages\numpy\distutils\system_info.py:639: UserWarnin
g: Specified path C:\projects\windows-wheel-builder\atlas-builds\atlas-3.11.38-s
se2-64\lib is invalid.
warnings.warn('Specified path %s is invalid.' % d)
<class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
NOT AVAILABLE
atlas_3_10_info:
<class 'numpy.distutils.system_info.atlas_3_10_info'>
NOT AVAILABLE
atlas_threads_info:
Setting PTATLAS=ATLAS
<class 'numpy.distutils.system_info.atlas_threads_info'>
NOT AVAILABLE
atlas_info:
<class 'numpy.distutils.system_info.atlas_info'>
NOT AVAILABLE
c:\python27\lib\site-packages\numpy\distutils\system_info.py:1548: UserWarni
ng:
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:1559: UserWarni
ng:
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:1562: UserWarni
ng:
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\foo\appdata\local\temp\pip-build-r3jpxr\SciPy\setup.py",
line 415, in <module>
setup_package()
File "c:\users\foo\appdata\local\temp\pip-build-r3jpxr\SciPy\setup.py",
line 411, in setup_package
setup(**metadata)
File "c:\python27\lib\site-packages\numpy\distutils\core.py", line 135, in
setup
config = configuration()
File "c:\users\foo\appdata\local\temp\pip-build-r3jpxr\SciPy\setup.py",
line 335, in configuration
config.add_subpackage('scipy')
File "c:\python27\lib\site-packages\numpy\distutils\misc_util.py", line 10
03, in add_subpackage
caller_level = 2)
File "c:\python27\lib\site-packages\numpy\distutils\misc_util.py", line 97
2, in get_subpackage
caller_level = caller_level + 1)
File "c:\python27\lib\site-packages\numpy\distutils\misc_util.py", line 90
9, 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 10
03, in add_subpackage
caller_level = 2)
File "c:\python27\lib\site-packages\numpy\distutils\misc_util.py", line 97
2, in get_subpackage
caller_level = caller_level + 1)
File "c:\python27\lib\site-packages\numpy\distutils\misc_util.py", line 90
9, 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\\foo\\appdata\\local\\temp\\pip-build-r3jpxr\\SciPy\\setup.py';exec(co
mpile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __
file__, 'exec'))" install --record c:\users\foo\appdata\local\temp\pip-efo9to
-record\install-record.txt --single-version-externally-managed --compile" failed
with error code 1 in c:\users\foo\appdata\local\temp\pip-build-r3jpxr\SciPy\
編輯1,試圖pip install scipy-0.18.0-cp27-cp27m-win_amd64.whl
,但遇到了奇怪的問題,
C:\Python27\Scripts>pip install scipy-0.18.0-cp27-cp27m-win_amd64.whl
Requirement 'scipy-0.18.0-cp27-cp27m-win_amd64.whl' looks like a filename, but t
he file does not exist
Processing c:\python27\scripts\scipy-0.18.0-cp27-cp27m-win_amd64.whl
Exception:
Traceback (most recent call last):
File "c:\python27\lib\site-packages\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "c:\python27\lib\site-packages\pip\commands\install.py", line 299, in run
requirement_set.prepare_files(finder)
File "c:\python27\lib\site-packages\pip\req\req_set.py", line 370, in prepare_
files
ignore_dependencies=self.ignore_dependencies))
File "c:\python27\lib\site-packages\pip\req\req_set.py", line 587, in _prepare
_file
session=self.session, hashes=hashes)
File "c:\python27\lib\site-packages\pip\download.py", line 798, in unpack_url
unpack_file_url(link, location, download_dir, hashes=hashes)
File "c:\python27\lib\site-packages\pip\download.py", line 705, in unpack_file
_url
unpack_file(from_path, location, content_type, link)
File "c:\python27\lib\site-packages\pip\utils\__init__.py", line 599, in unpac
k_file
flatten=not filename.endswith('.whl')
File "c:\python27\lib\site-packages\pip\utils\__init__.py", line 482, in unzip
_file
zipfp = open(filename, 'rb')
IOError: [Errno 2] No such file or directory: 'C:\\Python27\\Scripts\\scipy-0.18
.0-cp27-cp27m-win_amd64.whl'
它看起來像你缺少一些需要的庫之前,你可以安裝scipy。我會推薦'pip安裝conda'然後'conda安裝scipy' – James
感謝James,conda的問題是它對matplotlib不太適用,請參閱此處的討論。 http://stackoverflow.com/questions/39059732/using-matplotlib-on-mac-for-python-2-7,如果你有一些解決方案,使conda和matplotlib一起工作,欣賞共享。 –