Reputation: 27
I am working on a project and a sub task is to find the distance between two points. However, the geopy module isn't functioning.
I have pip installed the module: pip install geopy
. However, when I run my program I get an error.
Traceback (most recent call last):
File "/Users/name/Documents/Krems/Programming/Assignment 3/code/code.py", line 3, in <module>
from geopy.distance import geodesic
ModuleNotFoundError: No module named 'geopy'
The import I use is import geopy.distance
Upvotes: 0
Views: 1335
Reputation: 11
I had the same problem. I solved the problem by installing the package using terminal under my "venv" instead of anaconda terminal. Try this, it may help
Upvotes: 1
Reputation: 1
Here's a quick explain so you can understand.
from geopy.distance import geodesic
In this line you are asking python to import 'geodesic' from geopy.distance, but it seems like you didn't install geopy.
Try using pip3 install geopy
and tell me if it works.
Upvotes: 0