Practical overview
When it fits
Use PyTrial when you want a Python library with documented pipelines and tutorials for experimenting with AI methods on clinical-trial or drug-development tasks.
Who it is for
- Machine-learning researchers exploring AI methods for drug development.
- Medical practitioners and research teams working with clinical-trial data.
- Python developers building or prototyping clinical-trial analysis workflows.
Documented uses
- Predict individual patient outcomes or clinical-trial outcomes.
- Support clinical-trial site selection and patient-trial matching.
- Search for similar trials or simulate trial data.
- Explore data-mining and natural-language-processing workflows relevant to drug development.
Requirements & limits
The project is public on GitHub and specifies a BSD-2-Clause license. Installation guidance requires PyTorch first and recommends installing PyTrial from GitHub rather than PyPI while development is ongoing.
- The package expects task data to be prepared according to the relevant input protocol.
- The README identifies Python 3.7 as the tested version.
- PyTrial uses a consistent fit, predict, save, and load interface across tasks and models.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Install PyTrial from its GitHub source
Set up PyTrial in a Python environment for later clinical-trial or drug-development workflows.
Before you start
- Python 3.7 or later; the installation documentation says PyTrial was tested with Python 3.7+.
- PyTorch 1.8.0 or later, installed using instructions appropriate for the device and CUDA setup.
Steps
Install a compatible PyTorch version using the official PyTorch installation instructions.
Install PyTrial from GitHub with the command below.
pip install git+https://github.com/RyanWangZf/pytrial.gitFor the alternative local-source method, clone the repository, change into the
pytrialdirectory, and run the command below.pip install .
Expected outcome
PyTrial is installed and ready for task-specific tutorials covering clinical-trial and drug-development workflows.
Guide limitations
- The installation page identifies Python 3.7+ and PyTorch 1.8.0+ as tested requirements.
- The repository README does not recommend PyPI installation while the package is undergoing rapid development.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 12 October 2026
- Original website title
- Keiji-AI/PyTrial · Official homepage title · retained in its source language

