====== Install Python ======
CCDciel include a Python scripting [[ccdscript|interface]].
For simple script it is sufficient to use the default Python included with Linux or installed by CCDciel on Windows. In this case you can ignore the end of this page..
But if you use a Mac or want a more advanced usage that need to install specific astronomy modules, you can follow the instructions below
==== Windows ====
* Download the Python installer from [[https://www.python.org/downloads/windows]] \\ Get the last stable installer corresponding to your system, for example **Windows installer (64-bit)**
* Run the downloaded installer and click on "Install Now", follow the next steps to the end.
{{ :en:documentation:python_install_1.png?400 |}}
* Open a command line prompt to use pip to install the additional modules you need.\\ For example: py -m pip install alpyca requests pyserial astropy astroplan matplotlib numpy tk
{{ :en:documentation:python_install_2.png |}}
* In CCDciel [[preferences#files|preference]] change the Python command to **py.exe**
{{ :en:documentation:python_install_3.png |}}
==== macOS ====
Old Mac version used to provide a Python version 2, this is not suitable for our use. New macOS do not provide anything. In all case you need to install Python 3 as describe below.
* Download the Python installer from [[https://www.python.org/downloads/macos]], Get the last stable universal installer.
* Open the downloaded installer, follow the steps to the end.
* Open a command line prompt to create a virtual environment:python3 -m venv ~/.venvs/astro
* Activate the environment: source ~/.venvs/astro/bin/activate
* From the same activated shell install the modules you need: pip3 install alpyca requests pyserial astropy astroplan matplotlib numpy tk
* In CCDciel [[preferences#files|preference]] change the Python command to:\\ /Users/{username}/.venvs/astro/bin/python3
==== Linux ====
On Linux Python and many modules are already installed with the system. \\ If you want more, the best is to create a virtual environment to install the additional modules.
* Create the virtual environment: python3 -m venv ~/.venvs/astro
* Activate the environment: source ~/.venvs/astro/bin/activate
* From the same activated shell install the modules you need: pip3 install alpyca requests pyserial astropy astroplan matplotlib numpy tk
* In CCDciel [[preferences#files|preference]] change the Python command to:\\ /home/{username}/.venvs/astro/bin/python3