Search code examples
pythonpython-2.7easy-install

After install using easy_install, still get import error


So I'm trying to install pyshp and pyproj for an assignment in a class, and I'm trying to use easy_install. I've used it before and it worked, but this time, with both of these packages, I pull up the Command Prompt (Admin) and run:

C:\WINDOWS\system32>easy_install pyshp
Searching for pyshp
Best match: pyshp 1.2.1
Processing pyshp-1.2.1-py2.7.egg
pyshp 1.2.1 is already the active version in easy-install.pth

Using c:\users\adam\anaconda\lib\site-packages\pyshp-1.2.1-py2.7.egg
Processing dependencies for pyshp
Finished processing dependencies for pyshp

So great, looks to me like it worked. Then I run

C:\WINDOWS\system32>python
...
>>>import pyshp
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named pyshp

I've looked for similar problems in other people's questions but I don't see this come up exactly, or I don't see a solution offered. I saw one thing say that if you enter the command

>easy_install .

it'll set up or do something to packages that have already been downloaded and installed, but I tried that and it didn't change anything.

All the same basic stuff happens when I do this with pyproj too. Any idea what's going on?

[Edit: Also, I just searched my computer for anything with "pyproj" in the name and there's nothing. So it sounds like nothing got downloaded or installed at all. I'm confused.]


Solution

  • Even if the name of the package is pyshp, the library is called shapefile as you can read in the documentation. So your import should be:

    import shapefile