skyfielders / python-skyfield

Elegant astronomy for Python
MIT License
1.43k stars 213 forks source link

Cannot run skyfield: "ImportError: No module named api" #277

Closed natnet00 closed 5 years ago

natnet00 commented 5 years ago

I created a python 2.7.9 virtual environment and ran: pip install numpy==1.16 pip install skyfield

When I try to run a file with the code "from skyfield.api import load"

I get "ImportError: No module named api"

brandon-rhodes commented 5 years ago

Do you have a file of your own named skyfield.py? If so then you might be importing that rather than the real Skyfield.

natnet00 commented 5 years ago

You were right! My test script was called skyfield.py

I tried it on 2 different PCs with different linux operating systems and couldn't spot the error. Thanks for the fast response!