Installing rfblocks
It’s recommended (although not mandatory) that the rfblocks
module
be installed in a Python virtual environment. For more detail about
creating virtual environments please consult Using pyenv to Manage Virtual Environments.
The package can be installed “manually” as follows:
git clone git@gitlab.com:dyadic/rfblocks.git
cd rfblocks
pip install .
Test the install:
python
>>> import rfblocks
>>> rfblocks.__version__
'0.1.0'
>>>
Now have a look at Getting Started with rfblocks.
Using pyenv
to Manage Virtual Environments
Pyenv enables easy switching between multiple versions of Python and together with the pyenv-virtualenv plugin allows Python virtual environments to run arbitrary Python versions.
The easiest way to get pyenv
and the associated plugins installed is
to use pyenv-installer:
curl https://pyenv.run | bash
This will install pyenv
along with some useful plugins including
pyenv-virtualenv
. At the end of the run something like the
following should be shown:
WARNING: seems you still have not added 'pyenv' to the load path.
# Load pyenv automatically by adding
# the following to ~/.bashrc:
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
The exact output will depend on the shell in use. The instructions should be followed and when done the shell needs to be reloaded:
exec "$SHELL" # Or just restart your terminal
Install a Python version
pyenv install -v 3.8.8
Create a new virtual environment
pyenv virtualenv 3.8.8 rfblocks
Install rfblocks
into the virtual environment
Ensure that pip
is up to date:
pyenv activate rfblocks
python -m pip install --upgrade pip
Now clone and install rfblocks and dependencies:
git clone git@gitlab.com:dyadic/rfblocks.git
cd rfblocks
pip install .