centos install scipy 问题:File "scipy/linalg/setup.py", line 20, in configuration raise NotFoundE

本文档详细介绍了Python科学计算中常用包的安装步骤及注意事项,包括pyparsing、dateutil、scipy、numpy等,并提供了针对特定错误的解决方案。
依赖包:

pyparsing、dateutil、scipy、numpy、libpng 1.2 (or later)、`freetype` 1.4 (or later)


安装pyparsing:

# pip install pyparsing


安装numpy:

# pip install numpy

安装dateutil:

# pip install Python-dateutil


安装scipy:

# pip install scipy

待测:sudo yum -y install gcc gcc-c++ numpy python-devel scipy(不过这些包都装好了)


报错:

# pip install scipy
Downloading/unpacking scipy
  Downloading scipy-0.17.1.tar.gz (12.4MB): 81kB downloaded
Exception:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/pip-1.3.1-py2.7.egg/pip/basecommand.py", line 139, in main
    status = self.run(options, args)
  File "/usr/local/lib/python2.7/site-packages/pip-1.3.1-py2.7.egg/pip/commands/install.py", line 266, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/usr/local/lib/python2.7/site-packages/pip-1.3.1-py2.7.egg/pip/req.py", line 1033, in prepare_files
    self.unpack_url(url, location, self.is_download)
  File "/usr/local/lib/python2.7/site-packages/pip-1.3.1-py2.7.egg/pip/req.py", line 1161, in unpack_url
    retval = unpack_http_url(link, location, self.download_cache, self.download_dir)
  File "/usr/local/lib/python2.7/site-packages/pip-1.3.1-py2.7.egg/pip/download.py", line 554, in unpack_http_url
    download_hash = _download_url(resp, link, temp_location)
  File "/usr/local/lib/python2.7/site-packages/pip-1.3.1-py2.7.egg/pip/download.py", line 458, in _download_url
    chunk = resp.read(4096)
  File "/usr/local/lib/python2.7/socket.py", line 380, in read
    data = self._sock.recv(left)
  File "/usr/local/lib/python2.7/httplib.py", line 567, in read
    s = self.fp.read(amt)
  File "/usr/local/lib/python2.7/socket.py", line 380, in read
    data = self._sock.recv(left)
  File "/usr/local/lib/python2.7/ssl.py", line 246, in recv
    return self.read(buflen)
  File "/usr/local/lib/python2.7/ssl.py", line 165, in read
    return self._sslobj.read(len)
SSLError: The read operation timed out
Storing complete log in /root/.pip/pip.log


解决方法:

# pip --default-timeout=100 install django

重新安装scipy


各个安装包版本:

nose-1.3.1

lapack-3.5.0

atlas-3.10.1

scipy-0.11.0

numpy-1.6.2

依赖关系:scipy的安装需要依赖于numpy、lapack、atlas(后两者都是线性代数工具包,不清楚的自行google),而numpy和sci的测试程序的运行又依赖于nose,因此,整个安装过程必须要按顺序执行的,否则是无法执行下去的。


安装nose:

# pip install nose


安装lapack:

#yum install lapack lapack-devel blas blas-devel


更新pip
# pip install --upgrade pip


安装scipy:

# pip install scipy


安装matplotlib:

# pip install matplotlib

报错:


安装freetype:

依赖freetype-devel

# yum install freetype-devel

# yum install freetype

安装matplotlib:

# cd matplotlib-1.5.1

# python setup.py install

测试:


参考:http://paperman825.blog.chinaunix.NET/uid-25691489-id-5602653.html




Downloading https://files.pythonhosted.org/packages/49/cc/08bba60f00541f62aaa252ce0cfbd60aebd04616c0b9574f755b583e45ae/pygame-2.6.1.tar.gz (14.8MB) 100% |████████████████████████████████| 14.8MB 72kB/s Complete output from command python setup.py egg_info: Skipping Cython compilation WARNING, No "Setup" File Exists, Running "buildconfig/config.py" Using UNIX configuration... /bin/sh: dpkg-architecture: command not found /bin/sh: sdl2-config: command not found /bin/sh: sdl2-config: command not found /bin/sh: sdl2-config: command not found Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-build-e1we19i4/pygame/setup.py", line 432, in <module> buildconfig.config.main(AUTO_CONFIG) File "/tmp/pip-build-e1we19i4/pygame/buildconfig/config.py", line 234, in main deps = CFG.main(**kwds, auto_config=auto) File "/tmp/pip-build-e1we19i4/pygame/buildconfig/config_unix.py", line 245, in main raise RuntimeError('Unable to run "sdl-config". Please make sure a development version of SDL is installed.') RuntimeError: Unable to run "sdl-config". Please make sure a development version of SDL is installed. Hunting dependencies... WARNING: "sdl2-config" failed! --- For help with compilation see: https://www.pygame.org/wiki/Compilation To contribute to pygame development see: https://www.pygame.org/contribute.html --- ---------------------------------------- Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-e1we19i4/pygame/ You are using pip version 9.0.3, however version 25.2 is available. You should consider upgrading via the 'pip install --upgrade pip' command.
最新发布
09-09
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值