Installation
PySlyde can be installed from PyPI or from source. This guide covers all installation methods and requirements.
Requirements
PySlyde requires Python 3.8 or higher and the following dependencies:
numpy >= 1.20.0
opencv-python >= 4.5.0
openslide-python >= 1.1.0
pandas >= 1.3.0
matplotlib >= 3.3.0
seaborn >= 0.11.0
scikit-image >= 0.18.0
scipy >= 1.7.0
lmdb >= 1.2.0
einops >= 0.4.0
h5py >= 3.1.0
huggingface_hub >= 0.10.0
tensorflow >= 2.8.0
torch >= 1.10.0
timm >= 0.6.0
webdataset >= 0.2.0
Installation from PyPI
The easiest way to install PySlyde is using pip:
pip install pyslyde
This will install PySlyde and all its dependencies automatically.
Installation from Source
To install from source, clone the repository and install in development mode:
git clone https://github.com/gregoryverghese/PySlide.git
cd PySlide
pip install -e .
Development Installation
For development work, install with development dependencies:
git clone https://github.com/gregoryverghese/PySlide.git
cd PySlide
pip install -e ".[dev]"
This includes additional tools for development:
pytest - Testing framework
pytest-cov - Coverage reporting
black - Code formatting
flake8 - Linting
mypy - Type checking
pre-commit - Git hooks
System Dependencies
Some dependencies may require system-level libraries:
Ubuntu/Debian:
sudo apt-get update
sudo apt-get install libopenslide-dev libgl1-mesa-glx libglib2.0-0
macOS:
brew install openslide
Windows:
For Windows, most dependencies are available as pre-compiled wheels. If you encounter issues with OpenSlide, you may need to install it manually from the OpenSlide website.
Verifying Installation
To verify that PySlyde is installed correctly, run:
import pyslyde
print(pyslyde.__version__)
You should see the version number printed without any errors.
Troubleshooting
Common Installation Issues
OpenSlide not found: Make sure you have the system-level OpenSlide library installed.
CUDA issues: If you’re using GPU acceleration, ensure you have the correct CUDA version installed for your PyTorch/TensorFlow version.
Memory issues: PySlyde works with large images, so ensure you have sufficient RAM (8GB+ recommended).
Permission errors: On some systems, you may need to use pip install –user or install with sudo.
Getting Help
If you encounter installation issues:
Check the GitHub issues for similar problems
Create a new issue with your system details and error messages
Contact the maintainer at gregory.verghese@gmail.com