====== Python Installation ====== Python shall be available in computer labs, you do not have to install anything. The following is mainly for the installation on your home computers. ===== Suggested way of installation ===== We suggest to install Python using a tool called ''uv'' into a virtual environment to prevent unwanted interactions with system-wide Python installation. ''uv'' is an external manager of various Python versions, package installation, and managing virtual environments and projects. It can be somewhat intimidating for novices, but we suggest to get used to it. You will save yourself lots of troubles in the future! - [[https://docs.astral.sh/uv/getting-started/installation/|Install]] ''uv'' itself - [[https://docs.astral.sh/uv/guides/install-python/|Install Python]] using ''uv'' - How to [[https://docs.astral.sh/uv/guides/scripts/|run scripts]] using ''uv'' - How to [[https://docs.astral.sh/uv/guides/projects/|manage projects and virtual environments]] using ''uv'' ===== Other ways of installation ===== There are many other ways how to install Python on your computer: * [[https://www.python.org/downloads/|Installation from python.org]] * [[https://docs.conda.io/projects/conda/en/stable/index.html|conda]] - package and virtual environment manager (not only) for Python from Anaconda distribution * [[https://docs.anaconda.com/miniconda/install/|Installation]] of ''conda'' * [[https://docs.conda.io/projects/conda/en/stable/user-guide/tasks/manage-python.html|Installation of Python into a virtual environment]] ===== Virtual environment ===== In practice you will often need several installed Python version, each with its own packages and libraries. Virtual environments come to the rescue. They will help you to create many independent installations of Python, with different versions and packages. * [[https://realpython.com/python-virtual-environments-a-primer/|Module venv]] ([[https://docs.python.org/3/library/venv.html|docs]]) - Python's built-in module for virtual environment management * [[https://docs.anaconda.com/working-with-conda/environments/|conda]] * [[https://docs.astral.sh/uv/pip/environments/|uv venv]] or use [[https://docs.astral.sh/uv/guides/projects/|uv projects]] directly