Installation¶
Install Python¶
Note
Protean supports Python 3.7 and newer, but it is recommended that that you use the latest version of Python.
Virtual environments allow you to install multiple Python versions side-by-side, without interfering with system-default Python installations. They also help you to work with different groups of Python libraries, one for each project, thereby preventing packages installed in one project from affecting other projects.
There are many version managers that help you create virtual environments, like pyenv and pipenv, but we will quickly walk through the steps to create a virtual environment with one bundled with Python, venv
.
Create an environment¶
Create a project folder and a venv
folder within:
$ mkdir myproject
$ cd myproject
$ python3 -m venv venv
> mkdir myproject
> cd myproject
> py -3 -m venv venv
Activate the environment¶
Before you work on your project, activate the corresponding environment:
$ . venv/bin/activate
> venv\Scripts\activate
Your shell prompt will change to show the name of the activated environment.
You can verify the Pyton version by typing python
from your shell;
you should see something like:
Python 3.8.10 (default, Jun 21 2021, 15:30:31)
[Clang 12.0.5 (clang-1205.0.22.9)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
Install Protean¶
Within the activated environment, install Protean with the following command:
$ pip install protean
Verifying¶
Use the protean
command-line utility to verify the installation:
$ python -m protean --version
0.11.0
To verify that Protean can be seen by your current installation of Python,
try importing Protean from a python
shell:
$ python3
>>> import protean
>>> protean.get_version()
0.11.0
That’s it! You can now move onto the Quickstart.