相关疑难解决方法(0)

无法通过pip安装Scipy

通过pip安装scipy时:

pip install scipy
Run Code Online (Sandbox Code Playgroud)

Pip无法构建scipy并抛出以下错误:

Cleaning up...
Command /Users/administrator/dev/KaggleAux/env/bin/python2.7 -c "import setuptools, tokenize;__file__='/Users/administrator/dev/KaggleAux/env/build/scipy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/zl/7698ng4d4nxd49q1845jd9340000gn/T/pip-eO8gua-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/administrator/dev/KaggleAux/env/bin/../include/site/python2.7 failed with error code 1 in /Users/administrator/dev/KaggleAux/env/build/scipy
Storing debug log for failure in /Users/administrator/.pip/pip.log
Run Code Online (Sandbox Code Playgroud)

我怎样才能成功建立scipy?这可能是OSX Yosemite的一个新问题,因为我刚刚升级并且之前没有安装过scipy的问题.


调试日志:

Cleaning up...
  Removing temporary dir /Users/administrator/dev/KaggleAux/env/build...
Command /Users/administrator/dev/KaggleAux/env/bin/python2.7 -c "import setuptools, tokenize;__file__='/Users/administrator/dev/KaggleAux/env/build/scipy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/zl/7698ng4d4nxd49q1845jd9340000gn/T/pip-eO8gua-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/administrator/dev/KaggleAux/env/bin/../include/site/python2.7 failed with error code 1 in /Users/administrator/dev/KaggleAux/env/build/scipy
Exception information:
Traceback (most recent call last): …
Run Code Online (Sandbox Code Playgroud)

python scipy

117
推荐指数
10
解决办法
20万
查看次数

pip install numpy的问题 - RuntimeError:Broken toolchain:无法链接一个简单的C程序

我正在尝试将numpy(和scipy和matplotlib)安装到virturalenv中.

我不断收到这些错误:

RuntimeError: Broken toolchain: cannot link a simple C program

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1
Run Code Online (Sandbox Code Playgroud)

我安装了xcode的命令行工具

$ which gcc
/usr/bin/gcc
$ which cc
/usr/bin/cc
Run Code Online (Sandbox Code Playgroud)

我在Mac OSX 10.9上使用brew安装的python

编辑
是,尝试使用pip进行安装.
整个追溯是巨大的(> 400线)

这是它的一部分:

C compiler: cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe



compile options: '-Inumpy/core/src/private -Inumpy/core/src -Inumpy/core …
Run Code Online (Sandbox Code Playgroud)

python numpy pip virtualenv

75
推荐指数
8
解决办法
6万
查看次数

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

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

$ cd /usr/local/bin
$ ln -s gcc-4.8 gfortran
$ pip install scipy
Run Code Online (Sandbox Code Playgroud)

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

customize Gnu95FCompiler
Found executable /usr/local/bin/gfortran
customize NAGFCompiler
Could not locate executable f95
customize AbsoftFCompiler
Could not locate executable f90
Could not locate executable f77
customize IBMFCompiler
Could not locate executable xlf90
Could not locate executable xlf
customize IntelFCompiler
Could not locate executable ifort
Could not locate executable ifc
customize GnuFCompiler
Could not locate executable g77
customize G95FCompiler
Could not …
Run Code Online (Sandbox Code Playgroud)

python macos homebrew fortran numpy

36
推荐指数
2
解决办法
3万
查看次数

标签 统计

python ×3

numpy ×2

fortran ×1

homebrew ×1

macos ×1

pip ×1

scipy ×1

virtualenv ×1