Python 2.7 on Windows installation for Astronomy

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
3 replies · 2K views
Hugom42
Hello people i know this program is better to use on Linux, but for personal reasons i can't change to Linux OS. So I'm having a little problema on how to use python and install the modules of astropy, ipython, I've already installed pip but i have a error on python shell that says: Error syntax, i write the instruction pip install astropy and also sudo pip install and doesn't work. Hope you can answer me quickly and can solve this problem!
 
Physics news on Phys.org
Hugom42 said:
Hello people i know this program is better to use on Linux, but for personal reasons i can't change to Linux OS. So I'm having a little problema on how to use python and install the modules of astropy, ipython, I've already installed pip but i have a error on python shell that says: Error syntax, i write the instruction pip install astropy and also sudo pip install and doesn't work. Hope you can answer me quickly and can solve this problem!
Why aren't you using a newer version of Python? 2.7 is fairly old, with the current version for Windows being v3.5. The documentation for Python gives all the steps needed for running Python under Windows, which is mostly setting up the environment variables (such as path and a few others) so that Python can find the directories needed.
 
Hugom42 said:
i have a error on python shell that says: Error syntax, i write the instruction pip install astropy and also sudo pip install and doesn't work.
The pip commands are not meant to be run within the Python shell- they need to be run at a command prompt in Windows.

I would stay with 2.7 if you are going to be doing scientific computing. A number of packages still aren't fully compatible with version 3, and most of the code you come across will probably have been written in 2.7.