b_dev
b_dev

Reputation: 2588

I can see the directory in the python sys.path yet I get an error when I try to import the library?

My guess is I am missing something very basic and obvious which some one can point out to me.

The below screen capture of a short command-line session shows the following:

I can see the pysal directory exists in the sys.path yet I get an ImportError when I try to import pysal?

alt text

Upvotes: 1

Views: 176

Answers (1)

Ignacio Vazquez-Abrams
Ignacio Vazquez-Abrams

Reputation: 798576

Python imports packages and modules within the entries in sys.path, not the entries themselves. This means that either C:\Users\Max\Documents\pysal\pysal.py or C:\Users\Max\Documents\pysal\pysal\__init__.py would have to exist in order to be imported.

Upvotes: 2

Related Questions