由于在 Mac OS X 上 brew install gcc 后缺少 fortran 编译器,仍然无法安装 scipy

编程入门 行业动态 更新时间:2024-10-28 07:18:49
问题描述

我已阅读并遵循 this answer 来安装 scipy/numpy/theano.但是,在 brew install gcc 之后,它仍然因缺少 Fortran 编译器的相同错误而失败.虽然 HomeBrew 安装了 gcc-4.8,但它没有安装任何 gfortran 或 g95 命令.我认为 gfortran 可能只是 同义词 gcc,然后我创建一个符号链接

I have read and followed this answer to install scipy/numpy/theano. However, it still failed on the same error of missing Fortran compiler after brew install gcc. While HomeBrew installed the gcc-4.8, it didn't install any gfortran or g95 commands. I figure gfortran may be just a synonymy of gcc, then I create a symlink

$ cd /usr/local/bin$ ln -s gcc-4.8 gfortran$ pip install scipy

然后它检测到 gfortran 命令但仍然抱怨没有 Fortran 编译器

Then it detects the gfortran command but still complaining no Fortran compiler

customize Gnu95FCompilerFound executable /usr/local/bin/gfortrancustomize NAGFCompilerCould not locate executable f95customize AbsoftFCompilerCould not locate executable f90Could not locate executable f77customize IBMFCompilerCould not locate executable xlf90Could not locate executable xlfcustomize IntelFCompilerCould not locate executable ifortCould not locate executable ifccustomize GnuFCompilerCould not locate executable g77customize G95FCompilerCould not locate executable g95customize PGroupFCompilerCould not locate executable pgfortrandon't know how to compile Fortran code on platform 'posix'building 'dfftpack' libraryerror: library dfftpack has Fortran sources but no Fortran compiler found

我还应该做什么?

推荐答案

通过升级 pip 修复,即使我刚刚在同一天重新安装了我的 pip/virtualenv.

Fixed by upgrading pip, even though I just installed my pip/virtualenv the first time anew on the same day.

(mypy)MAC0227: $ pip install --upgrade pip...(mypy)MAC0227: $ pip install theano/Users/me/.virtualenvs/mypy/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:79: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see www.51sjk/Upload/Articles/1/0/341/341411_20230115104602094.jpg InsecurePlatformWarningRequirement already satisfied (use --upgrade to upgrade): theano in /Users/me/.virtualenvs/mypy/lib/python2.7/site-packagesRequirement already satisfied (use --upgrade to upgrade): numpy>=1.6.2 in /Users/me/.virtualenvs/mypy/lib/python2.7/site-packages (from theano)Collecting scipy>=0.11 (from theano)/Users/me/.virtualenvs/mypy/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:79: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see www.51sjk/Upload/Articles/1/0/341/341411_20230115104602094.jpg InsecurePlatformWarning Downloading scipy-0.15.1-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (19.8MB) 100% |████████████████████████████████| 19.8MB 23kB/sInstalling collected packages: scipySuccessfully installed scipy-0.15.1
  • 0
  • 0
  • 0
  • 0
  • 0

更多推荐

由于在 Mac OS X 上 brew install gcc 后缺少 fortran 编译器,仍然无法安装 scipy

本文发布于:2023-05-22 18:56:47,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1326171.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!