skyfielders / python-skyfield

Elegant astronomy for Python
MIT License
1.39k stars 209 forks source link

Skyfield Not Working in Anaconda Prompt #794

Closed TTurmanian closed 1 year ago

TTurmanian commented 1 year ago

I have installed Anaconda Navigator (version 2.1.1), and Skyfield, but when I try to test what version of Skyfield I have using the code from the Skyfield documentation, I get an error saying the '<' sign was not expected. See screenshot below.

(Skyfield is already installed since running 'pip install skyfield' results in several lines saying 'requirement already satisfied'.

Skyfield in Anaconda Prompt Window

brandon-rhodes commented 1 year ago

You cannot enter Python code at the > Windows system prompt, it does not, alas, understand it. You will need to launch the Anaconda Python interpreter—do the instructions tell you how to run it?

TTurmanian commented 1 year ago

No, not the Skyfield instructions. I'm looking at the Anaconda documentation for the Anaconda Python interpreter.

TTurmanian commented 1 year ago

By Anaconda Python interpreter, do you mean an IDE like Spyder? In Spyder, I tried calling skyfield.VERSION from the console , but it returned a 'name 'skyfield' not defined ' error.

brandon-rhodes commented 1 year ago

@TTurmanian — I'm catching up on issues after a few busy months, and only just noticed your follow-on questions. Alas, I'm not sure how to answer, as I don't know how your environment is set up. I get a Python prompt by running the python or python3 command at my system prompt. If you have an IDE, you'll want to consult its documentation to learn how to get an interactive Python prompt.

I'm going to close this issue, since Skyfield works fine with both the system prompt and with IDEs, and since my guess is that you probably have gotten it working in the meantime. But feel free to make further comments if there's something you have not gotten working yet—GitHub issues can still receive comments even after they are closed.