Some of the libraries below will not work on a Windows environment, sorry. If you have no other options than using Windows, I recommend that you work on a virtual machine (see e.g. VirtualBox for a tutorial which should give you a working environment). On Mac, it should work (some packages might need to be installed with brew
).
You will need a working python3.6+ environment on your machine. I recommend the installation of anaconda:
sh Anaconda3-2021.11-Linux-x86_64.sh
no
to the questionDo you wish the installer to initialize Anaconda3 by running conda init?
anaconda3/bin
(or the directory in which Anaconda3 is installed) to your ~/.bashrc
:export PATH="~/anaconda3/bin/:$PATH"
Upon a successful installation, you should be able to run python code using spyder, running jupyter notebooks and to open a python shell:
$ which python
~/anaconda3/bin/python
$ python
Python 3.8.10 (default, May 4 2021, 00:00:00)
[GCC 10.2.1 20201125 (Red Hat 10.2.1-9)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
Use CTRL+D to exit the python console.
Then, open a shell (or the anaconda prompt if you are using windows) and run
$ pip install nullspace_optimizer[osqp,colored,matplotlib]
This should install the nullspace_optimizer package on your machine. You can check the installation is successful by running an example, e.g.
$ python -m nullspace_optimizer.examples.ex1
See https://gitlab.com/florian.feppon/null-space-optimizer for a complete documentation of the package.
Then, run the homework .ipynb
files by running
$ jupyter notebook
in the directory in which they are located.
We will also use the libraries pymedit
and pyfreefem
during the course to manipulate meshes and to interact with FreeFEM (see this page). You can install them easily by running
pip install pymedit
pip install pyfreefem