将scipy升级到最新版本

唐贝

我正在运行Ubuntu 14.04。我的密码为0.13.3,我想对其进行升级。

我试过了:

sudo pip3 install scipy --upgrade

但我收到此错误:

creating build/lib.linux-x86_64-3.4/scipy/_build_utils

copying scipy/_build_utils/__init__.py ->
build/lib.linux-x86_64-3.4/scipy/_build_utils

copying scipy/_build_utils/_fortran.py ->
build/lib.linux-x86_64-3.4/scipy/_build_utils

running build_clib
customize UnixCCompiler
customize UnixCCompiler using build_clib
building 'dfftpack' library
Running from scipy source directory.

"object of type 'type' has no len()" in evaluating 'len(list)'
(available names: [])

"object of type 'type' has no len()" in evaluating 'len(list)'
(available names: [])

"object of type 'type' has no len()" in evaluating 'len(list)'
(available names: [])

"object of type 'type' has no len()" in evaluating 'len(list)'
(available names: [])

"object of type 'type' has no len()" in evaluating 'len(list)'
(available names: [])

"object of type 'type' has no len()" in evaluating 'len(list)'
(available names: [])

error: library dfftpack has Fortran sources but no Fortran compiler found

----------------------------------------   
Rolling back uninstall of scipy Cleaning up... 
Command /usr/bin/python3 -c "import setuptools, 
tokenize;__file__='/tmp/pip_build_root/scipy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), file__,
'exec'))" install --record /tmp/pip-h0l8itnj-record/install-record.txt
--single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_root/scipy Storing debug log for failure in  /home/donbeo/.pip/pip.log 

donbeo@donbeo-HP-EliteBook-Folio-9470m:~$
python3

我该如何解决?我正在为Ubuntu 14.04进行几乎全新的安装。

卡雷尔

通过阅读您的问题,我看到了:如何在Windows上的winpython中更新scipy?您想要将scipy更新到版本0.14的Stack Overflow上。与使用pip3相比,有一种将python3-scipy 0.13.3升级到python3-scipy 0.14.0的简便方法。

  1. 卸载python3-scipy。

    sudo apt-get remove python3-scipy
    
  2. 下载适用于Ubuntu 14.10的python3-scipy软件包。
    访问http://packages.ubuntu.com/utopic/python3-scipy,选择与您的操作系统体系结构匹配的python3-scipy版本,选择一个镜像,然后下载python3-scipy .deb文件。

  3. 为Ubuntu 14.10安装python3-scipy软件包。
    双击下载的python3-scipy .deb文件,在Ubuntu软件中心中将其打开,然后像安装其他任何软件包一样进行安装。Ubuntu 14.10的python3-scipy .deb文件与Ubuntu软件中心的python3-scipy软件包具有相同的依赖程序包版本,因此应将其安装在Ubuntu 14.04中,不会出现任何问题。

在Ubuntu 16.04中,可以从默认Ubuntu存储库安装python3-scipy 0.16.1。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章