模块安装出现技术问题,求各位高人解答,不甚感激!!!
系统是mac os,用easy setup在终端安装了统计module,叫做panda,表示安装已成功,显示如下:
Raytek iMac Book-Pro:~ Ray$ easy_install panda
Searching for panda
Best match: panda 0.1.4
Processing panda-0.1.4-py2.7.egg
panda 0.1.4 is already the active version in easy-install.pth
Using /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/panda-0.1.4-py2.7.egg
Processing dependencies for panda
Finished processing dependencies for panda
我用的IDE是Spyder,打开以后引入该模块,结果却是:
>>> import panda
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named panda
>>>
其实不只是panda,安装其他模块也是这样,端口显示安装成功,用Python自己的IDLE也能够正常import,就是在Spyder下不行,请各位大神给点建设性意见吧,费解中··· ----------------------- 以下是精选回复-----------------------
Raytek iMac Book-Pro:~ Ray$ easy_install panda
Searching for panda
Best match: panda 0.1.4
Processing panda-0.1.4-py2.7.egg
panda 0.1.4 is already the active version in easy-install.pth
Using /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/panda-0.1.4-py2.7.egg
Processing dependencies for panda
Finished processing dependencies for panda
我用的IDE是Spyder,打开以后引入该模块,结果却是:
>>> import panda
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named panda
>>>
其实不只是panda,安装其他模块也是这样,端口显示安装成功,用Python自己的IDLE也能够正常import,就是在Spyder下不行,请各位大神给点建设性意见吧,费解中··· ----------------------- 以下是精选回复-----------------------
答:Spyder用的python可能不是easy install用的python。你看看python自己的idl用的python版本和路径,在Spyder里面设置成同样的就好了。
答:好像easy_install已经被pip代替了,用pip吧。
Why use pip over easy_install?: http://stackoverflow.com/questions/3220404/why-use-pip-over-easy-install
答:在 mac 上 spyder 有几种安装方式:
1. 通过 macports 安装;
2. 下载独立的 spyder.app;
3. 通过 pip install 安装;
都行。
我的 spyder 是用方法 1 安装的,刚刚使用 pip install panda,然后打开 spyder,在它自带的 python 解释器里是可以引入 panda 的。
答:你既然有了 easy_install, 那么就在命令行下执行 easy_install pip;pip 就安装了,然后你就可以在命令行下用了。
0条评论