0

I need your help for installing the module GeoPy in PyCharm.

When I execute my project, there is this error :

ModuleNotFoundError: No module named 'geopy'

I haven't found the package GeoPy in PyCharm, so I have tried to install it with this command:

pip install geopy-1.17.0-py2.py3-none-any.whl

The installation seems to be correct. But in PyCharm, it always says "No module named 'geopy'". Does someone know how can I make ssure that GeoPy is installed?

I work on MacOS High Sierra 10.13.6 with Anaconda and Python 3.

Shayan Shafiq
  • 1,447
  • 5
  • 18
  • 25
Nelly Barret
  • 144
  • 1
  • 17
  • 1
    Can you try to run `conda install -c conda-forge geopy` in the Pycharm terminal? Chances are you did not install the library in the correct environment. – Eskapp Sep 25 '18 at 18:20
  • 1
    I have tried but my terminal says `command not found: conda` but in PyCharm I have created a conda environment... – Nelly Barret Sep 25 '18 at 18:24
  • https://www.jetbrains.com/help/pycharm/settings-tools-terminal.html Try to set Setting -> Tools -> Terminal -> Shell path to the zsh one to see if it changes something. (I'm not a mac user but got the issue once on Windows. Trying to remember how I solved this) – Eskapp Sep 25 '18 at 18:30
  • 1
    My zsh is in the shell path... Thank you so much – Nelly Barret Sep 25 '18 at 18:42
  • https://stackoverflow.com/questions/31615322/zsh-conda-pip-installs-command-not-found This might help solving the `conda` command not found. – Eskapp Sep 25 '18 at 18:48
  • 1
    After many command lines, it doesn't want to work. I think that I install in the right environment... In the terminal, it says that geopy is already installed but it doesn't appear in the folder anaconda3. – Nelly Barret Sep 25 '18 at 19:40

1 Answers1

0

check out your project interpreter in:

settings >> Project >> Project interpreter

it seems like you are using an virtual environment, so you can add the geopy library using the + icon on the right bar.

Edit:

based on your environment path try this:

source /Users/nelly/.conda/envs/HiL-recommender/bin/activate
pip install geopy
aasmpro
  • 554
  • 9
  • 21
  • hi there, @NellyBarret after clicking the `+` button, search for it, and you should find it. – aasmpro Sep 25 '18 at 19:46
  • I have typed geopy after clicking the button +, but nothing appears in the list (I have already installed shapely for example and works fine, but I can't find geopy in the list) – Nelly Barret Sep 25 '18 at 20:04
  • Wow! @NellyBarret could you comment the Project Interpreter address that the settings show you? – aasmpro Sep 25 '18 at 20:16
  • /Users/nelly/.conda/envs/HiL-recommender/bin/python – Nelly Barret Sep 25 '18 at 20:27
  • Hi, in bin there is no "activate" file so my terminal says "so such file or directory". Edit : but I have an activate file in /Users/nelly/anaconda3/bin/activate – Nelly Barret Sep 26 '18 at 06:50
  • @NellyBarret try this: `conda install -c conda-forge geopy` – aasmpro Sep 26 '18 at 07:10