0

I had download pandas from this link Then I unzipped the pandas file in site-packages and run the python setup.py command.

import pandas work fine in the directory where it is installed

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
>>>

Once am out of the directory pandas-0.17.1, import pandas gives following results:

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
>>>

Why is it so?

Gurminder Bharani
  • 501
  • 1
  • 8
  • 22

1 Answers1

1

you should add PYTHONPATH in your shell like this on windows.

set PYTHONPATH=%PYTHONPATH%;C:\Python27\ArcGIS10.3\Lib\site-packages\pandas-0.17.1

  • It is working only in the directory in which I am pasting this command. is there a way to make it globally available ? – Gurminder Bharani Mar 12 '16 at 14:41
  • Yes. In Windows, click the Start button, right click Computer and select Properties. Select "Advanced system settings" on the left pane. Under the Advanced tab, click the "Environment Variables..." button. Find the variable "Path" inside the "System variables" list box, select and edit it, appending the new location. In your case: C:\Python27\ArcGIS10.3\Lib\site-packages\pandas-0.17.1 – EduardoCMB Mar 22 '16 at 19:17