Installation of a Development Environment (Spyder) and SciPy (Scientific Computing)

 

The development of programs (scripts) is most comfortable with a development environment like IDLE (integrated in Python 3) or Spyder. The latter is preferred by the author. To have it available an add-on module called jupyter should be installed. It is part of a large package of add-on scientific libraries developed by the community of SciPy.org. The best thing to do is to install all 6 open-source packages called NumPy (numerical computing), SciPy library (fundamental library), Matplotlib (graphics), IPython (improved Python console with many practical functionalities not included in the normal Python console), Sympy (for symbolic computing) and pandas (finest matrix computing, data structures and analysis). The IPython package includes the Spyder3 development environment mentioned above and is automatically installed with it.

Jupyter is installed using the package management program pip with the command sequence

pip3 install –upgrade pip                 (to have pip3 in current form)

pip3 install jupyter

The others analog. Then you can call the development environment from a console with the command spyder3 and work with it. Alternatively, you can also use the usual program start routines for the operating system.

The package management program pip must be used consistently. Either install everything with pip or nothing, otherwise there can be confusion with the background scripts. If, for example, you have installed the Anaconda distribution, you must not use its package management program conda and then pip in between. Then always conda! However, conda can only access packages that are integrated in the Anaconda distribution. This guarantees that there are no dependency problems on libraries and that the Python3 system remains consistent. With the disadvantage that you are limited to the Anaconda distribution.

In the later sections we will see which additional modules we will install, those that are essential for astronomical applications.

It’s important to get into the Python language if you’re a complete beginner in Python. You have to invest a few days to learn the most important basics like data structures, program instructions like loops, data manipulations etc. and to practice how to work in a Python console. But the learning curve is very steep!