Skip to content
Connor Ward edited this page Sep 20, 2023 · 4 revisions

Why

It can be helpful to install Firedrake using a Python executable installed with pyenv rather than a system provided version. This is because:

  • When the system Python bumps a minor version (e.g. 3.10 -> 3.11) the Firedrake virtual environment will still work.
  • MacOS ships with a broken Python installation and the homebrew version also does not always work.

How

To install pyenv (assuming MacOS with homebrew installed) one needs to:

  1. Install build dependencies
  2. Install pyenv
    brew install pyenv
    
  3. Set PYENV_ROOT and PATH
    $ export PYENV_ROOT=$HOME/.pyenv
    $ export PATH=$PYENV_ROOT/bin:$PATH
    
  4. Initialise the shell
    $ eval "$(pyenv init -)"
    
    Note that this command is optional. One can instead find the installed Python versions under $(pyenv root)/versions. See here for more information.
  5. Install a Python version (here 3.11)
    $ pyenv install 3.11
    
  6. Set this Python as the default for this shell (only if using pyenv init)
    $ pyenv shell 3.11
    
  7. Run firedrake-install, python will resolve to the correct executable
    $ python firedrake-install <args>
    

Note that the above instructions are equivalent to those found here.

Home

Building locally
Tips

Install Frequently Asked Questions

Running on HPC

Users

Developers Notes

Minutes and agenda of Firedrake meetings


Policies and procedures

Gravity wave scaling

Merge Complex Sprint

Reading Group

Firedrake 2021 Planning Meetings
Clone this wiki locally