- Linux
- Conda
- Python 3.6+
a. Create a conda virtual environment and activate it.
pip install xrprimer
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==1.51.1
conan remote add openxrlab http://conan.openxrlab.org.cn/artifactory/api/conan/openxrlab
d. Install Opencv
pip install opencv-python
# or install opencv in headless mode
pip install opencv-python-headless
e. 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__)"