Python Python 2.7 on Windows installation for Astronomy

Click For Summary
The discussion centers on issues related to installing Python modules, specifically Astropy and IPython, on a Windows operating system. The user reports encountering a syntax error when attempting to use pip commands within the Python shell. It is emphasized that pip commands should be executed in the Windows command prompt, not in the Python shell. Additionally, there is a recommendation to use Python 2.7 for scientific computing due to compatibility concerns with various packages, as many existing codes are written for this version. Users are advised to check the official Python documentation for guidance on setting up the environment variables necessary for proper Python operation 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.
 
I tried a web search "the loss of programming ", and found an article saying that all aspects of writing, developing, and testing software programs will one day all be handled through artificial intelligence. One must wonder then, who is responsible. WHO is responsible for any problems, bugs, deficiencies, or whatever malfunctions which the programs make their users endure? Things may work wrong however the "wrong" happens. AI needs to fix the problems for the users. Any way to...

Similar threads

  • · Replies 1 ·
Replies
1
Views
8K
  • · 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
5K