Installation in Python virtual environment
If you already have Python 3.7 or later installed, you can easily give Open Peer Power a spin.
It’s recommended when installing Python packages that you use a virtual environment. This will make sure that your Python installation and Open Peer Power installation won’t impact one another. The following steps will work on most UNIX like systems.
Install
- Create a virtual environment in your current directory:
python3 -m venv openpeerpower
- Open the virtual environment:
cd openpeerpower
- Activate the virtual environment:
source bin/activate
- Install Open Peer Power:
python3 -m pip install openpeerpower
- Run Open Peer Power:
opp --open-ui
- You can now reach the web interface on
http://ipaddress:8123/
- the first start may take a couple of minutes before the web interface is available. This can take longer if you’re using lower-end hardware like a Raspberry Pi Zero.
Upgrade
-
Stop Open Peer Power
- Open the directory where the virtual environment is located, activate the virtual environment, then upgrade Open Peer Power:
cd openpeerpower source bin/activate python3 -m pip install --upgrade openpeerpower
- Start Open Peer Power
- You can now reach the web interface on
http://ipaddress:8123/
- the first start may take some time before the web interface is available, depending on how many integrations need to be upgraded.
Run a specific version
In the event that a Open Peer Power version doesn’t play well with your hardware setup, you can downgrade to a previous release. For example:
cd openpeerpower
source bin/activate
pip3 install openpeerpower==0.XX.X
Run the beta version
If you would like to test next release before anyone else, you can install the beta version, for example:
cd openpeerpower
source bin/activate
pip3 install --pre --upgrade openpeerpower
Run the development version
If you want to stay on the bleeding-edge Open Peer Power development branch, you can upgrade to dev
.
For example:
cd openpeerpower
source bin/activate
pip3 install --upgrade git+git://github.com/OpenPeerPower/Open-Peer-Power.git@dev
Notes
- In the future, if you want to start Open Peer Power manually again, follow step 2, 3 and 5.
- It’s recommended to run Open Peer Power as a dedicated user.
- If you want Open Peer Power to automatically start at boot, check the autostart documentation
After upgrading Python
If you’ve upgraded Python (for example, you were running 3.7.1 and now you’ve installed 3.7.3) then you’ll need to build a new virtual environment. Simply rename your existing virtual environment directory:
mv openpeerpower openpeerpower.old
Then follow the Install steps again, being sure to use the newly installed version of Python.