0

I am lost in the installation process of installing anaconda on windows.

I've installed the windows 32bit package (I'm running windows 7 x64)

I have anaconda in the start menu and I can open the python console and use scipy.stats.t.interval(), the function I am interested in.

However, how do I go about including this in another python program? I think it's something like adding it to the path. For instance, I have the scipy.stats.t.interval() function call in my other python file which I run through cygwin via python myscript.py. However it returns the error:

from scipy.stats import t
ImportError: No module named scipy.stats

I think it might be a change of path / add to path issue, but I'm not sure how to fix it :/. While I try to fix it, I figure I will post for help here.

4

1 に答える 1

2

1 つは anaconda パッケージ内にあり、もう 1 つは以前にインストールしたものです。やってみてください:

which python

CygWin コンソールから。返された場合:

/usr/bin

それは間違いなくパスへの追加の問題です。CygWin 用に修正するには、python インストールを anaconda からパスに追加する必要があります。

CygWinからこれを試してください:

PATH=path-where-anaconda-is-installed/anaconda/bin:$PATH

そして、次のことを行います:

which python 

あなたに与えるべきです:

/path-to-anaconda/anaconda/bin

そしてそれはうまくいくでしょう。

乾杯

于 2013-07-02T08:58:49.327 に答える