Closed markmno closed 2 years ago
pip
can only install python packages. However FFCV depends on C++ libraries. Therefore it impossible to install FFCV just using pip
. You can however install the required libraries with your operating system. We require libturbojpeg
and opencv
C++ libraries and their corresponding headers. We won't give a guide for that since instructions to install those depend on the operating system you use.
I managed to get it working (pip install ffcv numba opencv-python) by installing libturbojpeg-dev
and libopencv-dev
inside docker (I'm using nvidia/cuda:11.2.1-base-ubuntu20.04
)
In my case (Ubuntu 22.04, Python 3.11 virtual environment), I had to:
sudo apt install libopencv-dev
sudo apt install libturbojpeg-dev
sudo apt-get update
sudo apt-get install --reinstall build-essential
sudo apt-get install python3.11-dev
pip install ffcv
The build-essential
reinstall was because I faced some type of gcc
error:
x86_64-linux-gnu-gcc: fatal error: cannot execute ‘cc1plus’: execvp: No such file or directory
And the python3.11-dev
install was because I faced a Python error:
./libffcv/libffcv.cpp:2:10: fatal error: Python.h: No such file or directory
Could you please provide pip installation guide?