Installation#
predictably currently supports:
environments with python version 3.7, 3.8, 3.9, 3.10 or 3.11
operating systems Mac OS X, Unix-like OS, Windows 8.1 and higher
Checkout the full list of pre-compiled wheels on PyPI.
Release versions#
Most users will be interested in installing a released version of predictably
using one of the approaches outlined below. For common installation issues,
see the troubleshooting release installations section.
Installing predictably#
predictably releases are available via PyPI and can be installed via pip.
Users can choose whether to install the predictably with its standard dependencies
or alternatively to install predictably with all its dependencies using the
code snippets below.
pip install predictably
pip install predictably[all_extras]
Note
We are still working on creating releases of predictably on conda.
If you would like to help, please open a pull request.
Note
We are still working on creating releases of predictably on conda.
If you would like to help, please open a pull request.
Troubleshooting release installations#
Missing soft dependencies#
Users may run into problems, when they install the core version of predictably,
but attempt to use functionality that requires soft dependencies to be installed.
To resolve this, install the missing package, or install predictably
with maximum dependencies (see above).
Development versions#
To install the latest development version of predictably, the sequence
of steps is as follows:
Clone the
predictablyGithub repositoryCreate a new virtual environment via
condaand activate it.Use
pipto buildpredictablyfrom source and install development dependencies
Detail instructions for each step is provided below.
Step 1 - Clone Github repository#
The predictably Github repository should be cloned to a local directory.
To install the latest version using the git command line, use the following steps:
Use your command line tool to navigate to the directory where you want to clone
predictablyClone the repository:
git clone https://github.com/predict-ably/predictably.gitMove into the root directory of the package’s local clone:
cd predictablyMake sure you are on the main branch:
git checkout mainMake sure your local version is up-to-date:
git pull
See Github’s repository clone documentation for additional details.
Hint
If you want to checkout an earlier version of predictably you can use the
following git command line after cloning to run: git checkout <VERSION>
Where <VERSION> is a valid version string that can be found by inspecting the
repository’s git tags, by running git tag.
You can also download a specific release version from the Github repository’s zip archive of releases.
Step 2 - Create a new virtual environment#
Setting a new virtual environment before building predictably ensures that
conflicting package versions are not installed in the same environment.
You can choose your favorite env manager for this but we’re showing the
steps to create one using conda:
Use your command line tool to first confirm
condais present on your system:conda --versionCreate a new virtual environment named
predictably-devwith python version3.9or greater (conda create -n predictably-dev python=3.9)Activate this newly created environment:
conda activate predictably-dev
Step 3 - Build predictably from source#
When contributing to the project, you will want to install predictably locally,
along with additional dependencies used when developing the package.
You can opt for a static install of predictably from your local source, but
if you plan to contribute to the project you may be better served by
installing predictably in editable mode so that the the package updates each
time the local source code is changed.
Either way, including the “[dev,test]” modifier, makes sure that the additional
developer dependencies and test dependencies specified in the predictably
pyproject.toml file are also installed.
To use either approach:
Use your command line tool to navigate to the root directory of your local copy of the
predictablyprojectCopy the code snippet below that corresponds to the installation approach you would like to use
Paste the copied code snippet in your command line tool and run it
pip install .[dev,test]
pip install --editable .[dev,test]
Hint
In either the static or editable installation, the . may be replaced
with a full or relative path to your local clone’s root directory.
Hint
Using the “[dev]” modifier installs developer dependencies, including
pre-commit and other tools you’ll want to use when developing predictably.
In most cases, you’ll let pre-commit manage installation environments
for your linting tools. However, some integrated development environments
(for example, VS Code) will automatically apply linters (including
reformatting) on save. In some versions this requires the linters to be
installed directly in your development environment. If you want to easily
install all the linters used by predictably in your development environment use
pip install .[dev,test,linters]
or pip install --editable .[dev,test,linters] instead.
Building binary packages and installers#
The .whl package and .exe installers can be built with:
pip install wheel
python setup.py bdist_wheel
The resulting packages are generated in the dist/ folder.
References#
The installation instruction are adapted from sktime’s installation instructions.