PyKale requires Python 3.8, 3.9, or 3.10. Before installing pykale, you should
- manually install PyTorch matching your hardware first,
- if you will use APIs related to graphs, you need to manually install PyTorch Geometric first following its official instructions and matching your PyTorch installation, and
- If RDKit will be used, you need to install it via
pip install rdkit
.
Install PyKale using pip
for the stable version:
pip install pykale # for the core API only
Install from source for the latest version and/or development:
git clone https://github.com/pykale/pykale
cd pykale
pip install . # for the core API only
pip install -e .[dev] # editable install for developers including all dependencies and examples
PyKale provides six installation options for different user needs:
default
:pip install pykale
for essential functionalitygraph
:pip install pykale[graph]
for graph-related functionality (e.g., TDC)image
:pip install pykale[image]
for image-related functionality (e.g., DICOM)example
:pip install pykale[example]
for examples and tutorialsfull
:pip install pykale[full]
for all functionality, including examples and tutorialsdev
:pip install pykale[dev]
for development, including all functionality, examples, and tutorials
Multiple options can be chosen by separating them with commas (without whitespace). See examples below.
pip install pykale[graph,example]
pip install pykale[graph,image]
pip install pykale[graph,image,example]
For local unit tests on all kale
API, you need to have PyTorch, PyTorch Geometric, and RDKit installed (see the top) and then run pytest at the root directory:
pytest
You can also run pytest on individual module (see pytest documentation).