Skip to content

Instantly share code, notes, and snippets.

@Bouni
Last active April 25, 2019 15:53
Show Gist options
  • Save Bouni/dfb53e3f36d74029f397b00e1b5c9e1c to your computer and use it in GitHub Desktop.
Save Bouni/dfb53e3f36d74029f397b00e1b5c9e1c to your computer and use it in GitHub Desktop.
  1. Install python 3.6.8 from sources (maybe not necessary)
  2. Build libcec from source like described here, but instead of cmake -DRPI_INCLUDE_DIR=/opt/vc/include -DRPI_LIB_DIR=/opt/vc/lib .. do cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=1 -DRPI_INCLUDE_DIR=/opt/vc/include -DRPI_LIB_DIR=/opt/vc/lib -DCMAKE_INSTALL_PREFIX=/usr ..
  3. sudo make install copies cec.py and _cec.so to /usr/lib/python3.6/dist-packages/ but we need the in /usr/local/lib/python3.6/site-packages/, so do a sudo cp /usr/lib/python3.6/dist-packages/cec.py /usr/local/lib/python3.6/site-packages/ and a sudo cp /usr/lib/python3.6/dist-packages/_cec.so /usr/local/lib/python3.6/site-packages/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment