If you just wish to run the SKIRT code, there is no need for Python. The Python Toolkit for SKIRT (PTS) obviously requires a Python install. However, if you already have a Python install that conforms to the PTS system requirements then you can skip this topic as well.
The instructions in this topic describe how to install one of several available Python distributions on Ubuntu using the command line only, for example logged in to the system through an ssh connection. The installation procedure using the command line on other Unix systems is probably very similar.
The Anaconda distribution is an open source Python distribution that includes an extensive Python package manager. It offers many additional features, including the option to define and switch between multiple Python environments.
As a first step, you will need a regular, interactive Web browser to locate the appropriate Anaconda installer. In case the target system can be reached only through a command line interface, you will need to use a Web browser on another computer, possibly the computer through which you are logged in to the target system. That being said, follow the steps outlined below to install the Anaconda distribution.
mkdir AnacondaInstaller cd AnacondaInstaller wget https://repo.anaconda.com/archive/Anaconda3-2022.05-Linux-x86_64.shreplacing the URL by the appropriate current installer URL.
chmod +rx Anaconda3-2022.05-Linux-x86_64.sh ./Anaconda3-2022.05-Linux-x86_64.shagain replacing the file name by the current installer file name.
Follow the instructions displayed by the installer, accepting the default install location, and responding affirmative when asked whether the installer should initialize Anaconda3 by running conda init.
rm Anaconda3-2022.05-Linux-x86_64.sh cd .. rm -d AnacondaInstaller
To install extra Python packages in your Anaconda environment, follow the steps outlined below.
conda list
conda list numpy
conda
install
command. For example, enter: conda install reportlabThe conda command will display a list of packages to be installed and/or updated, including any dependencies of the requested package. Enter affirmative when asked whether to proceed.
conda
install
command to install all of them in one go.You are now ready to install PTS as described in Installing PTS (Unix or macOS).