Python 2.7 on Windows installation for Astronomy

Click For Summary

Discussion Overview

The discussion revolves around the installation of Python 2.7 and associated modules like Astropy and IPython on Windows, particularly addressing issues faced by users who prefer not to switch to Linux. The scope includes technical troubleshooting and installation guidance.

Discussion Character

  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant expresses difficulty in installing Astropy and IPython using pip on Windows, encountering a syntax error in the Python shell.
  • Another participant questions the choice of using Python 2.7, suggesting that newer versions like 3.5 are available and provide better support.
  • A third participant clarifies that pip commands should be executed in the command prompt rather than the Python shell.
  • Some participants argue that staying with Python 2.7 may be beneficial for scientific computing due to compatibility issues with certain packages in Python 3.
  • A link to a resource for Windows Python libraries is provided for further assistance.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the use of Python 2.7 versus newer versions, with some advocating for the older version due to compatibility concerns while others suggest upgrading.

Contextual Notes

There are unresolved issues regarding the specific syntax error encountered and the proper environment setup for running pip commands on Windows.

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!
 
Technology 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.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
10K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 16 ·
Replies
16
Views
5K
Replies
3
Views
2K
  • · Replies 17 ·
Replies
17
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 56 ·
2
Replies
56
Views
10K
  • · Replies 1 ·
Replies
1
Views
6K