2

ターミナルからビルドおよびインストールしてScipyをインストールしました。しかし、次の単純なコードを実行しようとすると、次のエラーが発生します。

from scipy.stats.mstats_basic import gmean

ab=[1,2,3,4,5,6]

print(gmean(ab))

これは私が得ているエラーです:

Traceback (most recent call last):

  File "/home/prashanthb/workspace/rankalgo/rough1.py", line 2, in <module>

    from scipy.stats.mstats_basic import gmean

  File "/usr/local/lib/python3.1/dist-packages/scipy/stats/__init__.py", line 321, in <module>

  File "/usr/local/lib/python3.1/dist-packages/scipy/stats/stats.py", line 194, in <module>

  File "/usr/local/lib/python3.1/dist-packages/scipy/special/__init__.py", line 525, in <module>

ImportError: No module named _cephes

しかし、デフォルトのインタープリター python 2.6 に切り替えると、同じコードが機能します。以前に Libatlas と lapack をインストールしたことがありますが、Numpy (既に python3 にインストールされています) はうまく動作しているようです。mpmathもインストールしました。

質問:ここから先に進んで python3 で動作するようにするにはどうすればよいですか? 幾何平均を計算する他のライブラリを誰かが知っている場合は、言及してください。前もって感謝します

更新: setup.py を再度ビルドしているときにこれを見つけました:

DeprecationWarning)

customize GnuFCompiler

Could not locate executable g77

Could not locate executable f77
customize IntelFCompiler

Could not locate executable ifort

Could not locate executable ifc

customize LaheyFCompiler

Could not locate executable lf95

customize PGroupFCompiler

Could not locate executable pgfortran

customize AbsoftFCompiler

Could not locate executable f90

customize NAGFCompiler

Found executable /usr/bin/f95

customize VastFCompiler

customize CompaqFCompiler

Could not locate executable fort

customize IntelItaniumFCompiler

Could not locate executable efort

Could not locate executable efc

customize IntelEM64TFCompiler

customize Gnu95FCompiler

Found executable /usr/bin/gfortran
customize Gnu95FCompiler
customize Gnu95FCompiler using config
compiling '_configtest.c':
4

0 に答える 0