Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to import shapefile

I have installed the pyshp package in my command prompt

pip install pyshp

and it’s successful ("Requirement already satisfied").

But I’m having problems importing shapefile into Jupyter Notebook with

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

import shapefile as sh

this gives the error: ModuleNotFoundError: No module named ‘shapefile’

What am I missing?

>Solution :

In your Jupyter notebook, write:

import sys
!{sys.executable} -m pip install pyshp
import shapefile as sh

Installing a package locally and installing it into your Jupyter kernel are two different things.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading