Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- For the life of me I can't seem to get this work
- Code:
- pip show skyfield
- Name: skyfield
- Version: 1.46
- Summary: Elegant astronomy for Python
- Home-page: http://github.com/brandon-rhodes/python-skyfield/
- Author: Brandon Rhodes
- Author-email: edited.org
- License: MIT
- Location: /home/ethan/python/lib/python3.11/site-packages
- Requires: certifi, jplephem, numpy, sgp4
- Required-by:
- I also have all the Requires installed
- this is the error i get when i run the code
- Code:
- Traceback (most recent call last):
- File "/home/ethan/Pictures/edited.py", line 1, in <module>
- from skyfield.api import load
- ModuleNotFoundError: No module named 'skyfield'
- This is the actual code
- Code:
- from skyfield.api import load
- skyfield_path = '/home/ethan/python/lib/python3.11/site-packages'
- # Create a timescale and ask the current time.
- ts = load.timescale()
- t = ts.now()
- # Load the JPL ephemeris DE421 (covers 1900-2050).
- planets = load('de421.bsp')
- earth, mars = planets['earth'], planets['mars']
- # What's the position of Mars, viewed from Earth?
- astrometric = earth.at(t).observe(mars)
- ra, dec, distance = astrometric.radec()
- print(ra)
- print(dec)
- print(distance)
- I cant get any code to run with any library that's inside the virtual env , so I must be doing something wrong
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement