Installation (Python)

  • Requirements

  • Prepare environment

  • Install XRPrimer(python)

Requirements

  • Linux

  • Conda

  • Python 3.6+

Prepare environment

a. Create a conda virtual environment and activate it.

Install XRPrimer (python)

Install with pip

pip install xrprimer

Install by compiling from source

a. Create a conda virtual environment and activate it.

conda create -n openxrlab python=3.8 -y
conda activate openxrlab

b. Clone the repo.

git clone https://github.com/openxrlab/xrprimer.git
cd xrprimer/

c. (Optional) Install conan

# compiling with conan accelerates the compilation with pre-built libs, otherwise it builds external libs from source
pip install conan
conan remote add openxrlab http://conan.openxrlab.org.cn/artifactory/api/conan/openxrlab

d. Install PyTorch and MMCV

Install PyTorch and torchvision following official instructions.

E.g., install PyTorch 1.8.2 & CPU

pip install torch==1.8.2+cpu torchvision==0.9.2+cpu -f https://download.pytorch.org/whl/lts/1.8/torch_lts.html

Install mmcv without cuda operations

pip install mmcv

e. Install xrprimer in editable mode

pip install -e .  # or "python setup.py develop"
python -c "import xrprimer; print(xrprimer.__version__)"