Pergunta

I am trying to read shapefiles to view suburbs in a city following this tutorial using windows 8, Anaconda and iPython.

I tried "conda install shapefile" and "pip install shapefile" in command prompt, both returning "Error: No packages found matching: shapefile".

Besides that I tried adding it manually following these links [1]How to import a module given the full path? [2]Import python module NOT on path. However I am getting permission errors which suggests I am not importing them correctly anyway.

Any suggestions on how to proceed or best practices are appreciated.

Foi útil?

Solução

try

pip install pyshp

in your cmd.

that is the name of you library as far as I can see, see https://pypi.python.org/pypi/pyshp

conda only works for these http://docs.continuum.io/anaconda/pkgs.html packages.

For the ones not in the list you need to use pip install. It can be confusing as the name of the library on pypi (this is where pip goes to download it) is often, but not always the same as the import name, so if conda and pip don't work, first try to google to make 100% sure that your library is not on pypi, because most respectable libraries are...

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top