How to Install#

It is recommended to use pip or conda for PyPOTS installation as shown below:

# via pip
pip install pypots            # the first time installation
pip install pypots --upgrade  # update pypots to the latest version
# via conda
conda install -c conda-forge pypots  # the first time installation
conda update  -c conda-forge pypots  # update pypots to the latest version

Alternatively, you can install from the latest source code which may be not officially released yet:

pip install

Required Dependencies#

  • Python >=3.7

  • numpy

  • scipy

  • scikit-learn

  • pandas <2.0.0

  • torch >=1.10.0

  • tensorboard

  • h5py

  • tsdb >=0.2

  • pygrinder >=0.2

Optional Dependencies#

  • torch-geometric (optional, required for GNN models like Raindrop)

  • torch-scatter (optional, required for GNN models like Raindrop)

  • torch-sparse (optional, required for GNN models like Raindrop)

Reasons of Version Limitations on Dependencies#

  • Why we need python >=3.7?

Python v3.6 and before versions have no longer been supported officially (check out status of Python versions here). Besides, PyG (torch-geometric) is available for Python >= v3.7 (refer to ). Although torch-geometric is an optional dependency, we hope things go smoothly when our users opt to install it.

In addition, note that Python v.3.7 has also been in the end-of-life status since 2023-06-27. Hence, we will raise the minimum support Python version to v3.8 in the future. Please use Python v3.8 or above if possible also for the security of your development environment.

  • Why we need pandas <2.0.0?

Because v2 may cause ModuleNotFoundError: No module named 'pandas.core.indexes.numeric', see

  • Why we need PyTorch >=1.10?

Because of pytorch_sparse, please refer to

  • Why we need TSDB and PyGrinder >=0.2?

Since v0.2, all libraries in PyPOTS ecosystem switch their licenses from GPL-v3-only to BSD-3-Clause, which has less constraints for users. Please refer to the discussion in issue PyPOTS#227 for details.


GPU Acceleration#

Neural-network models in PyPOTS are implemented in PyTorch. So far we only support CUDA-enabled GPUs for GPU acceleration. If you have a CUDA device, you can install PyTorch with GPU support to accelerate the training and inference of neural-network models. After that, you can set the device argument to "cuda" when initializing the model to enable GPU acceleration. If you don’t specify device, PyPOTS will automatically detect and use the default CUDA device if multiple CUDA devices are available.

CPU Acceleration#

If you’re using a Mac device with Apple Silicon in you can install the accelerate data-science packages to obtain faster processing speed, because they get optimized for Apple Silicon. conda install numpy scipy scikit-learn numexpr "libblas=*=*accelerate"

If you’re using devices with Intel chips in, you should install the distribution of MKL, which is optimized for multi-core Intel CPUs, conda install numpy scipy scikit-learn numexpr "libblas=*=*mkl"

If you’re using devices with AMD chips in, you can install with the distribution of OpenBLAS, conda install -c conda-forge numpy scipy scikit-learn numexpr "libblas=*=*openblas"