Installation#

Note

This guide is under active maintenance. Changes to both dependencies and installation steps may occur.

This installation guide assumes you are using VSCode as your IDE. Some of you may encounter issues. Please consult the all-knowing web or your preferred ChatGPT-like AI before reaching out about your issue. Errors or bugs with the provided steps below are directed to Github.

Alternative 1: Miniconda#

  1. Install Python using Miniconda via this download page

  2. Run the following three commands in a terminal or Anaconda prompt to update conda and create a conda environment

conda init
conda update -y conda
conda create -y --name ttk4130 python=3.11 sympy numpy scipy matplotlib ipython jupyter
  1. Install Visual Studio Code (VSCode) via the download page

  2. Start VSCode and activate your newly created Python environment, ttk4130 (See this guide on python environments)

  3. Install the following list of VSCode extensions (See this guide on managing VSCode extensions): Jupyter Extension, Python Extension

  4. Open or create a notebook file by opening the Command Palette (Ctrl+Shift+P) and select Jupyter: Create New Jupyter Notebook.

  1. Install Python using Miniconda via this download page

  2. Run the following three commands in a terminal or Anaconda prompt to update conda and create a conda environment

conda init
conda update -y conda
conda create -y --name ttk4130 python=3.11 sympy numpy scipy matplotlib ipython jupyter
  1. Install Visual Studio Code (VSCode) via the download page

  2. Start VSCode and activate your newly created Python environment, ttk4130 (See this guide on python environments)

  3. Install the following list of VSCode extensions (See this guide on managing VSCode extensions): Jupyter Extension, Python Extension

  4. Open or create a notebook file by opening the Command Palette (Command+Shift+P) and select Jupyter: Create New Jupyter Notebook.

  1. Install Python using Miniconda via this download page

  2. Run the following three commands in a terminal or Anaconda prompt to update conda and create a conda environment

conda init
conda update -y conda
conda create -y --name ttk4130 python=3.11 sympy numpy scipy matplotlib ipython jupyter
  1. Install Visual Studio Code (VSCode) via the download page

  2. Start VSCode and activate your newly created Python environment, ttk4130 (See this guide on python environments)

  3. Install the following list of VSCode extensions (See this guide on managing VSCode extensions): Jupyter Extension, Python Extension

  4. Open or create a notebook file by opening the Command Palette (Ctrl+Shift+P) and select Jupyter: Create New Jupyter Notebook.

Troubleshooting#

General tips:

  • Make sure you’re using the correct installer for your system architecture

  • Run the Miniconda installer with admin/sudo privileges if needed

  • Manually activate the coda environment in VSCode if it’s not detected

  • Restart your terminal or VSCode after installation to make sure the changes take effect

Common issues with conda are documented on the official Anaconda troubleshooting page.

Alternative 2: Manual Python Installation#

The steps for manual installation can vary a lot, hence I will only provide some hints that might help you.

(Being updated)

Step 1. Install Homebrew Follow the guide on the Homebrew website via this link here(https://brew.sh/).

Step 2. Install Python and PIP. The current supported Python version is Python 3.11.*.

brew install python@3.11

Check the install location with

brew info python@3.11

Which should print out /opt/homebrew/bin/python3.11. We do not need this python version as the default python version on your path, but we just need to know the install location.

Step 3. Create and activate a virtual environment in a directory (folder) of your choice

/opt/homebrew/bin/python3.11 -m venv ./ttk4130_env

This will activate the environment

source ttk4130_env/bin/activate

To exit the virtual environment press Ctrl + d

Step 4. Install requirements. Make sure you are at the root of this repository and you have activated the virtual environment. Run the following to install the requrirements

pip install sympy numpy scipy matplotlib ipython jupyter pythreejs

You can now activate your new Python environment in VSCode

(Being updated)

Software Versions#

This website was built with the following software versions. If you are encountering compatability, issues this list can be used as a reference:

import platform
platform.python_version()
'3.11.11'
import IPython
IPython.__version__
'8.25.0'
import jupyter_sphinx
jupyter_sphinx.__version__
'0.5.3'
import matplotlib
matplotlib.__version__
'3.8.4'
import notebook
notebook.__version__
'7.2.3'
import numpy
numpy.__version__
'1.26.4'
import plotly
plotly.__version__
'5.24.1'
import pythreejs._version
pythreejs._version.__version__
'2.4.2'
import sphinx_book_theme
sphinx_book_theme.__version__
'1.1.3'
import scipy
scipy.__version__
'1.14.1'
import sphinx
sphinx.__version__
'8.1.3'
import sphinx_material
sphinx_material.__version__
'0.0.36'
import sphinx_togglebutton
sphinx_togglebutton.__version__
'0.3.2'
import sphinx_design
sphinx_design.__version__
'0.6.1'
import sympy
sympy.__version__
'1.12.1'
import jupyterlite_sphinx
jupyterlite_sphinx.__version__
'0.16.5'
import jupyterlite_pyodide_kernel
jupyterlite_pyodide_kernel.__version__
'0.4.7'