在Virtualenv中的Mac OS Lion上安裝SciPy - Installing SciPy on Mac OS Lion in Virtualenv -开发者知识库

在Virtualenv中的Mac OS Lion上安裝SciPy - Installing SciPy on Mac OS Lion in Virtualenv -开发者知识库,第1张

I am trying to install scipy in my vertualenv on mac.

我試圖在我的vertualenv上安裝scipy。

Python using in virtualenv:

Python中使用的virtualenv:

(Django)miki725mac:Django miki725$ python
Python 2.7.2 (default, Aug  3 2011, 00:58:00) 
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 

I tries installing scipy by doing this which fails:

我嘗試通過這樣做安裝scipy失敗:

$ svn co http://svn.scipy.org/svn/scipy/trunk scipy
$ python setup.py build
$ python setup.py install

Then I tried:

然后我嘗試了:

$ pip install scipy

Also as per the suggestion I tried:

另外根據我嘗試的建議:

$ pip install -e git://github.com/scipy/scipy@effa6f68f8ada57b7986#egg=scipy-dev

Logs

Here are the complete logs for all the insallation steps: (they were too long for stackoverflow)

以下是所有安裝步驟的完整日志:(它們對於stackoverflow來說太長了)

python setup.py build

python setup.py構建

http://www.diglo.com/download/3dfc7a1af18617d7ee49faa8bea3464703ea

python setup.py install

python setup.py安裝

http://www.diglo.com/download/ab13985c76ad709b25464fa1254daa4b03ea

pip install scipy

pip安裝scipy

http://www.diglo.com/download/9e808fe5b57b6b01a8265d4b01958da703ea (pastebin: http://paste.pocoo.org/show/454004/ )

http://www.diglo.com/download/9e808fe5b57b6b01a8265d4b01958da703ea(pastebin:http://paste.pocoo.org/show/454004/)

pip install -e git://github.com/scipy/scipy@effa6f68f8ada57b7986#egg=scipy-dev

pip install -e git://github.com/scipy/scipy@effa6f68f8ada57b7986#egg=scipy-dev

http://www.diglo.com/download/085f7bd08e7cb86823718b94641ecacd03ea

Please help. I am new at all this. Thank you in advance.

請幫忙。我是新生的。先謝謝你。

4 个解决方案

#1


3  

Up until August 2011 Scipy was broken on Mac OS X Lion. Fixed in this commit: https://github.com/scipy/scipy/commit/effa6f68f8ada57b79864852b609ff06d2527306

截至2011年8月,Scipy在Mac OS X Lion上被打破。在此提交中已修復:https://github.com/scipy/scipy/commit/effa6f68f8ada57b79864852b609ff06d2527306

It looks like this change has not yet been merged to SVN trunk. Try github instead:

看起來此更改尚未合並到SVN中繼。試試github:

pip install -e git://github.com/scipy/scipy@effa6f68f8ada57b7986#egg=scipy-dev

That's worked for me on two installs of Lion. However if it doesn't I've heard using GCC-4.0 (instead of the current default: GCC-4.2) also solves the issue (haven't verified it though):

這對我來說有兩個Lion版本。但是如果不是我聽說過使用GCC-4.0(而不是當前的默認值:GCC-4.2)也解決了問題(雖然沒有驗證):

  1. Install macports
  2. sudo port install gcc40
  3. sudo port安裝gcc40

  4. Create a symlink from gcc-4.0 to gcc
  5. 創建一個從gcc-4.0到gcc的符號鏈接

  6. Recommended: after scipy is installed, change the symlink to point back to the xcode version of gcc-4.2
  7. 建議:安裝scipy后,更改符號鏈接以指向gcc-4.2的xcode版本

Steps 1 & 2 are only needed if you don't already have gcc-4.0.

僅當您還沒有gcc-4.0時才需要步驟1和2。

最佳答案:

DABAN RP主题是一个优秀的主题,极致后台体验,无插件,集成会员系统
U19学习网站 » 在Virtualenv中的Mac OS Lion上安裝SciPy - Installing SciPy on Mac OS Lion in Virtualenv -开发者知识库