Start Locally
Select your preferences and run the install command. Stable represents the most currently tested and supported version of pysensing. This should be suitable for many users. Please ensure that you have met the prerequisites below (e.g., numpy), depending on your package manager.
Installing on macOS
pysensing can be installed and used on macOS. Depending on your system and compute requirements, your experience with pysensing on a Mac may vary in terms of processing time. It is recommended, but not required, that your Mac have an NVIDIA GPU in order to harness the full power of pysensing’s CUDA support.
Currently, CUDA support on macOS is only available by building pysensing from source
Prerequisites
macOS Version
pysensing is supported on macOS 10.10 (Yosemite) or above.
Python
It is recommended that you use Python 3.7 or greater, which can be installed either through the Anaconda package manager (see below), Homebrew, or the Python website.
Package Manager
To install the pysensing binaries, you will need to use one of two supported package managers: Anaconda or pip. Anaconda is the recommended package manager as it will provide you all of the pysensing dependencies in one, sandboxed install, including Python.
Anaconda
To install Anaconda, you can download graphical installer or use the command-line installer. If you use the command-line installer, you can right-click on the installer link, select Copy Link Address
, and then use the following commands:
# The version of Anaconda may be different depending on when you are installing`
curl -O https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
sh Miniconda3-latest-MacOSX-x86_64.sh
# and follow the prompts. The defaults are generally good.`
pip
Python 3
If you installed Python via Homebrew or the Python website, pip
was installed with it. If you installed Python 3.x, then you will be using the command pip3
.
Tip: If you want to use just the command
pip
, instead ofpip3
, you can symlinkpip
to thepip3
binary.
Installation
pip
To install pysensing via pip, use one of the following command
# Python 3.x
pip install pysensing
Verification
To ensure that pysensing was installed correctly, we can verify the installation by running sample pysensing code. Here we will construct a randomly initialized tensor.
>>> import torch, pysensing as pp
>>> # A random so(3) LieTensor
>>> r = pp.randn_so3(2, requires_grad=True)
so3Type LieTensor:
tensor([[ 0.1606, 0.0232, -1.5516],
[-0.0807, -0.7184, -0.1102]], requires_grad=True)
Building from source
For the majority of pysensing users, installing from a pre-built binary via a package manager will provide the best experience. However, there are times when you may want to install the bleeding edge pysensing code, whether for testing or actual development on the pysensing core.
You will also need to build from source if you want CUDA support.
Prerequisites
- Install Anaconda
- Install CUDA, if your machine has a CUDA-enabled GPU.
- Install from source.
You can verify the installation as described above.
Installing on Linux
pysensing can be installed and used on various Linux distributions. Depending on your system and compute requirements, your experience with pysensing on Linux may vary in terms of processing time. It is recommended, but not required, that your Linux system has an NVIDIA GPU in order to harness the full power of pysensing's CUDA support.
Prerequisites
Python
Python 3.7 or greater is generally installed by default on any of our supported Linux distributions, which meets our requirements. We recommend starting with Anaconda and pip to create a controlled environment for your pysensing installation.
Install Anaconda
Download and install Anaconda using the command-line installer:
# The version of Anaconda may be different depending on when you are installing
curl -O https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
sh Miniconda3-latest-Linux-x86_64.sh
Follow the prompts. The defaults are generally good. You may need to open a new terminal or re-source your ~/.bashrc
to get access to the conda
command.
Create a pysensing environment with the specified Python version. We recommend using Python >= 3.10:
conda create -n pysensing python=3.10
conda activate pysensing
Install PyTorch
Follow the official PyTorch installation guide to install PyTorch based on your system's capabilities:
For systems with CUDA support (replace cu118
with your CUDA version):
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
For systems without CUDA support:
pip install torch torchvision torchaudio
Installation
pip
The pysensing package itself can be installed from PyPI:
pip install pysensing
Building from Source
If you want to build from source and get the latest version:
pip install --upgrade git+https://github.com/pysensing/pysensing.git
Verification
To ensure that pysensing
was installed correctly, verify the installation by running a sample tutorial notebook:
- Clone the
pysensing
repository: - Install Jupyter via pip:
- Navigate to the tutorial directory and launch Jupyter Notebook:
git clone https://github.com/pysensing/pysensing.git
pip install jupyter
cd pysensing/pysensing/acoustic/tutorials/
jupyter notebook
This will open the tutorial notebooks in your default web browser.
Installing on Windows
pysensing can be installed and used on various Windows distributions. Depending on your system and compute requirements, your experience with pysensing on Windows may vary in terms of processing time. It is recommended, but not required, that your Windows system has an NVIDIA GPU in order to harness the full power of pysensing's CUDA support.
Prerequisites
Supported Windows Distributions
pysensing is supported on the following Windows distributions:
- Windows 10 or greater recommended.
The install instructions here will generally apply to all supported Windows distributions. The specific examples shown will be run on a Windows 11 Home machine.
Python
Currently, pysensing on Windows only supports Python 3.7 or greater; Python 2.x is not supported.
As it is not installed by default on Windows, there are multiple ways to install Python:
If you decide to use Chocolatey and haven't installed Chocolatey yet, ensure that you are running your command prompt as an administrator.
For a Chocolatey-based install, run the following command in an administrative command prompt:
# Install Python via Chocolatey
choco install python
Package Manager
To install the pysensing binaries, you will need to use at least one of two supported package managers: Anaconda and pip.
pip
If you installed Python by any of the recommended ways above, pip will have already been installed for you.
Anaconda
Follow the instructions in Anaconda Download, and you will install Anaconda, including the Anaconda Navigator, which is intuitive for package management and recommended for Windows users.
Make sure you have added your
conda-directory
andconda-directory/Scripts
to yourPATH
variables after Anaconda installation. Otherwise, theconda
command in the Windows command-line tool will not be recognized.
CUDA
Before installing PyTorch, it is better to check the compatibility of your device. Refer to the CUDA compatibility and NVIDIA support matrix.
Note that CUDA Toolkit should be installed first, as it is the foundation for cuDNN.
CUDA Toolkit
Follow the instructions in CUDA Toolkit and run the executable for installation.
After installation, ensure the environment variables
CUDA_PATH
andCUDA_PATH_V12_1
(or your CUDA version) are set in the Windows system variables. Check the success of the installation withnvcc -V
.
cuDNN
When the CUDA Toolkit is ready, download cuDNN, extract the contents, and copy the lib
, bin
, and include
directories into your CUDA installation directory. Update your PATH
variables accordingly.
PyTorch
Create a virtual environment for PyTorch and pysensing installation:
# Create and activate a conda environment
conda create -n your_dev python=3.10
conda activate your_dev
Install PyTorch:
For systems with CUDA support:
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
For systems without CUDA support:
pip install torch torchvision torchaudio
Installation
pip
The pysensing package itself can be installed from PyPI:
pip install pysensing
Building from Source
If you want to build from source and get the latest version:
pip install --upgrade git+https://github.com/pysensing/pysensing.git
Verification
To ensure that pysensing was installed correctly, verify the installation by running a sample tutorial notebook:
- Clone the
pysensing
repository: - Install Jupyter via pip:
- Navigate to the tutorial directory and launch Jupyter Notebook:
git clone https://github.com/pysensing/pysensing.git
pip install jupyter
cd pysensing/pysensing/acoustic/tutorials/
jupyter notebook
This will open the tutorial notebooks in your default web browser.