TawnyOwl
Posts: 7
Joined: Fri Jun 22, 2018 12:22 pm

ephem module not found

Sun Jul 01, 2018 7:51 am

I want to use ephem :
https://pypi.org/project/ephem/

pip install ephem

in Python :
import ephem

When I run the script, I get the message :
ImportError: No module named 'ephem'

What am I doing wrong ?

DirkS
Posts: 10371
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: ephem module not found

Sun Jul 01, 2018 7:54 am

Do you use Python 2 or 3?
If it's Python 3 then you have to use pip3 to install modules

User avatar
B.Goode
Posts: 10356
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: ephem module not found

Sun Jul 01, 2018 7:56 am

Are you using the python ( = Python2) interpreter, or IDLE?

Or python3/IDLE3 ?

You appear to have installed the module only for the former.

(Same overall question as the previous reply, submitted as I was typing.. )

TawnyOwl
Posts: 7
Joined: Fri Jun 22, 2018 12:22 pm

Re: ephem module not found

Sun Jul 01, 2018 9:24 am

OK, thank you, it works now (pip3).

Return to “Python”