Installation¶
We recommend Python 3.10+ with PyTorch 1.4.0+ and transformers v4.41.0+ .
Install with pip¶
OntoLearner is available on the Python Package Index at pypi.org for installation.
pip install -U ontolearner
The following pip install will install the latest version of OntoLearner from the main branch of the OntoLearner at GitHub using pip.
pip install git+https://github.com/sciknoworg/OntoLearner.git
Install from Source¶
You can install OntoLearner directly from source to take advantage of the bleeding edge main branch for development.
Clone the repository:
git clone https://github.com/sciknoworg/OntoLearner.git
cd OntoLearner
(Optional but recommended) Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
Install dependencies and the library
pip install -e .
Hint
The -e flag installs the package in editable mode, which is ideal for development—changes in the code reflect immediately.
Install PyTorch with CUDA support¶
To use a GPU/CUDA for learners, you must install PyTorch with CUDA support. Follow PyTorch - Get Started for installation steps.