Installing OpenAD§
Tl;dr§
Info
When installing on macOS without a virtual environment, you may need to use python3
and pip3
instead of python
and pip
.
Installing on macOS / Linux§
Info
- Contributors: Skip to Installation for Development
- Linux users: Check the Linux Notes
- Poetry: If you prefer Poetry, you can run the setup wizard instead:
poetry add openad
-
Before you start
Ensure you're running Python 3.10.10+ or 3.11 - see Upgrading Python.To see what version you are running:
Note: Due to an issue with one of our dependencies, Python 3.12 is not yet supported.
-
Set up your virtual environment (recommended)
Note: Use
python3
on macOS.
Note: To exit the virtual environment, you can rundeactivate
-
Install OpenAD
-
Continue to Getting Started
Installing on Windows§
In order to run OpenAD on Windows 11, you will need to install the Ubuntu WSL package.
-
Verify Windows version
To check if you are running Windows 11 or later, pressWin
+R
, type "winver", and pressEnter
. A window will open showing your Windows version. -
Verify WSL
To check if you already have WSL installed, runwsl -l -v
into the terminal. To see more information about your current version of Ubuntu, runlsb_release -a
-
Install WSL
Install WSL and create a user called 'openad' or one of your choosing.Optional: To setup an Ubuntu Python environment from scratch, continue to Linux Notes
-
Continue to Getting Started
Appendix§
Upgrading Python§
There's many ways to install or upgrade Python. We'll use pyenv
.
-
Install pyenv
-
Set up your shell environment for Pyenv
Detailed instructions can be found here. If you're using Zsh, you can run the commands below: -
Reboot your shell
You can either open a new window or run: -
Install Python
Please note that OpenAD requires Python 3.10.10+ or 3.11.
Due to an issue with one of our dependencies, Python 3.12 is not yet supported. -
Activate this version of Python
If you wish to set this version as the default:Alternatively, if you only wish to activate it in the current shell:
-
Good to know:
If you're setting up a virtual environment, you need to set the python version before creating the venv.You can see the list of installed versions by running:
You can see the currently installed version by running:
Linux Notes§
If you wish to setup an Ubuntu Python environment from scratch, run:
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.11-full
sudo apt install python3-pip
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 100
sudo pip install pip --upgrade
You will need to restart your Linux session before running pip install openad
so that the python libraries are in your path.
If you get an error when running init_magic
, you may first need to setup the default iPython profile for magic commands.