Calculate time of meridian passage with GHPython

Your ephem seems to be this package: ephem · PyPI.

The python implementation used within Grasshopper / Rhino is called IronPython.
The “normal” / regular python implementation is called CPython. For CPython the use of pip as the package manager is very common. You can use it to install the ephem package. The ephem package can still work with the IronPython, but often it does not, so I’d suggest to either call your CPython code by for example defining a CLI that you from your GH_Python (which as i mentioned is using IronPython) or use hops as described in the following link (probably easier for a beginner):
Create CPython components using Hops in Grasshopper - Grasshopper / Hops - McNeel Forum