m******t 发帖数: 273 | 1 【 以下文字转载自 Statistics 讨论区 】
发信人: myregmit (myregmit), 信区: Statistics
标 题: import a stats module from Python
发信站: BBS 未名空间站 (Thu Mar 13 12:21:03 2014, 美东)
I need to import a stats module (from gamma) from python 3.3 on Win7.
In Eclipse++PyDev, I cannot import stats from scipy
from scipy import stats
error:
Unused import: stats
Import redefinition: stats
Unresolved import: stats
But, I can do it in iPython.
Also, I have installed ipython and can do it in ipython by
from scipy.stats import rv_discrete
But, I need to do it in Eclipse where I have added python, numpy and scipy
in it.
But, Eclipse tell me that
from scipy.stats import rv_discrete
error:
Unresolved import: rv_discrete
Import redefinition: rv_discrete
Unused import: rv_discrete
Any help would be really appreciated.
Thanks ! |
n****e 发帖数: 2401 | 2 需要在preferences/pydev/python interpreters加egg/zip什么的,或者重新auto
config |
m******t 发帖数: 273 | 3 Would you please tell me what egg/zip i need to add ?
I have installed scipy but Eclipse cannot find it.
But, iPython can find it.
Any help would be appreciated.
【在 n****e 的大作中提到】 : 需要在preferences/pydev/python interpreters加egg/zip什么的,或者重新auto : config
|
n****e 发帖数: 2401 | 4 ship your computer to me. I will take a look. |
a*******o 发帖数: 81 | 5 scipy没有在你python path里面。要么在pydev里面设置,要么把路径加到你的
PYTHONPATH变量里面。你的scipy有可能是ipython自带的。
回复你是因为很不喜欢niubee整天神道道的 |
z****u 发帖数: 185 | 6 maybe you can try this sequence?
import scipy
import scipy.stats |