PyPlanet requires Python 3.6 and later. We also require to have some operating system libraries and build tools installed. We will guide you through the steps that are required to install those requirements in this subtopic.
Install the operating system requirements by executing the following commands:
sudo apt-get update && sudo apt-get install build-essential libssl-dev libffi-dev python3-dev zlib1g-dev liblzma-dev
To make things as easy as possible we are going to use PyEnv. It’s a tool that will install Python for you with all the requirements and also manage to adjust the environment we are running in.
The following steps are the same for all distributions.
Make sure you are logged in as the user that is going to run PyPlanet. (Mostly not root!).
curl -L https://raw.githubusercontent.com/pyenv/pyenv-installer/master/bin/pyenv-installer | bash printf '\nexport PATH="$HOME/.pyenv/bin:$PATH"\neval "$(pyenv init -)"\neval "$(pyenv virtualenv-init -)"\n' >> ~/.bashrc source ~/.bashrc
pyenv install 3.7.6 pyenv global 3.7.6
The first set of commands makes adjustments to the
~/.bashrc file. It can be that you don’t have this file installed.
If that is the case, you can add those lines manually to any other script that is executed when you open your shell (
or execute these commands manually at every start of a SSH session. Your SSH session might have to be restarted after this change!
export PATH="~/.pyenv/bin:$PATH" eval "$(pyenv init -)" eval "$(pyenv virtualenv-init -)"
We recommend to separate multiple installations by creating a so called virtual environment. This will make sure you can run several PyPlanet and dependency versions on the same Python installation. You can skip this step if you don’t want to use virtual environments, but we recommend to use it.
pyenv virtualenv 3.7.6 my-env # Where 'my-env' is your environment name, you need adjust this if you have multiple installations.
You have to activate your virtual environment every time you want to execute PyPlanet commands! That means that you have to activate before you update, start, develop and do anything with PyPlanet!
pyenv activate my-env # Where 'my-env' is your environment name, you need adjust this if you have multiple installations.
PyPlanet is published through the Python Package Index (PyPi) and is easy to install with
pip install pyplanet --upgrade
After installing it on your system you can use the pyplanet cli commands. To get help about commands, use
After installing PyPlanet on your system, you can’t yet start any instances because starting requires you to give up an settings module. You could either provide this with the start command or create a project directory with skeleton files.
We recommend using the
init_project command to create a local project installation where you can install apps, keep
PyPlanet and it’s apps up-to-date, provide settings through a useful settings module and provide
manage.py as a wrapper
so you never have to manually provide your settings module.
In the example bellow we will setup a project with the name canyon_server. The folder canyon_server will be created and skeleton files will be copied.
pyplanet init_project canyon_server
After setup your project, you have to install or update your dependencies from your local
To upgrade your existing installation, see our Upgrading Guide.
If you use the virtual environment we installed in 3. Create environment for your installation, make sure you activate it before you install or update dependencies!
Head to the next step
Configure your PyPlanet installation now by going to the next chapter: Configuring PyPlanet.