无法导入SimPy

时间:2011-10-21 04:35:24

标签: easy-install simpy

我是SimPy的新手我使用easy_install安装SimPy模块然后在命令行上我只是尝试了from SimPy.Simulation import *但是我收到以下错误

Python 2.6.7 (r267:88850, Aug 22 2011, 14:13:38) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from SymPy.Simulation import *
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named SymPy.Simulation

我使用easy_install来安装软件包,我有simplejson安装没有任何问题,当我导入simplejson时,我没有得到上述错误。我做了更新,easy_install成功更新了SymPy模块,但我还是无法导入SimPy模块

[/Library/Python/2.6/site-packages]$easy_install -U SimPy
Searching for SimPy
Reading http://pypi.python.org/simple/SimPy/
Reading http://SimPy.SourceForge.net
Reading http://simpy.sourceforge.net/
Reading https://sourceforge.net/projects/simpy/files/
Reading http://pypi.python.org/simple/SimPy/simpy.sourceforge.net
Reading http://sourceforge.net/project/showfiles.php?group_id=62366
Best match: SimPy 2.2
Processing SimPy-2.2-py2.6.egg
SimPy 2.2 is already the active version in easy-install.pth

Using /Library/Python/2.6/site-packages/SimPy-2.2-py2.6.egg
Processing dependencies for SimPy
Finished processing dependencies for SimPy

我还检查easy-install.pth文件,看起来所有内容都已正确添加。

[/Library/Python/2.6/site-packages]$more easy-install.pth 
import sys; sys.__plen = len(sys.path)
./simplejson-2.1.3-py2.6.egg
./SimPy-2.2-py2.6.egg
import sys; new=sys.path[sys.__plen:]; del sys.path[sys.__plen:]; p=getattr(sys,'__egginsert',0); sys.path[p:p]=new; sys.__egginsert = p+len(new)

如果我能得到任何帮助,那就太好了。

最佳; NH

1 个答案:

答案 0 :(得分:1)