【发布时间】:2016-03-12 13:13:29
【问题描述】:
我已经从这个link下载了熊猫 然后我在 site-packages 中解压 pandas 文件并运行 python setup.py 命令。
import pandas 在安装目录下工作正常
C:\Python27\ArcGIS10.3\Lib\site-packages\pandas-0.17.1>python
Python 2.7.8 (default, Jun 30 2014, 16:03:49) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pandas
>>>
一旦离开目录pandas-0.17.1,import pandas 会给出以下结果:
C:\Python27\ArcGIS10.3\Lib\site-packages>python
Python 2.7.8 (default, Jun 30 2014, 16:03:49) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pandas
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named pandas
>>>
为什么会这样?
【问题讨论】:
-
那个目录可能不在
sys.path。
标签: python pandas installation