-
-
Save exp0nge/3dcd3ff6c5e4e4177a659f0d8d5071e1 to your computer and use it in GitHub Desktop.
How to install Python 3 with libmraa and upm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GETTING FROM REPO [Broken] | |
# Adding repositories and installing required software | |
echo "src/gz all http://repo.opkg.net/edison/repo/all" >> /etc/opkg/base-feeds.conf && echo "src/gz edison http://repo.opkg.net/edison/repo/edison" >> /etc/opkg/base-feeds.conf && echo "src/gz core2-32 http://repo.opkg.net/edison/repo/core2-32" >> /etc/opkg/base-feeds.conf && opkg update | |
# Updating mraa and upm | |
opkg upgrade libmraa0 && opkg upgrade upm | |
# Installing Python 3 and libs | |
opkg install mraa-python3 upm-python3 python3-misc python3-importlib | |
BUILDING FROM SOURCES (no need after AlexT_Intel added python 3 support to his repo) | |
# Adding repositories and installing required software | |
echo "src/gz all http://repo.opkg.net/edison/repo/all" >> /etc/opkg/base-feeds.conf && echo "src/gz edison http://repo.opkg.net/edison/repo/edison" >> /etc/opkg/base-feeds.conf && echo "src/gz core2-32 http://repo.opkg.net/edison/repo/core2-32" >> /etc/opkg/base-feeds.conf && opkg update && opkg install git nano mc htop tcl-dev liblzma-dev liblzma-staticdev | |
# Getting, compiling and installing Python 3 | |
wget https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tgz | |
tar xvf Python-3.6.0.tgz | |
cd Python-3.6.0 | |
./configure --prefix=/usr --enable-shared | |
make -j2 | |
make install | |
# Getting, compiling and installing libmraa | |
git clone https://github.com/intel-iot-devkit/mraa.git | |
cd mraa | |
mkdir build | |
cd build | |
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr .. | |
make -j2 | |
make install | |
# Getting, compiling and installing upm | |
git clone https://github.com/intel-iot-devkit/upm.git | |
cd upm | |
mkdir build | |
cd build | |
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr .. | |
make -j2 | |
make install | |
# OpenCV3 | |
http://opencv.org/releases.html | |
cmake -D WITH_IPP=ON -D WITH_TBB=ON -D BUILD_TBB=ON -D WITH_CUDA=OFF -D WITH_OPENCL=OFF -D BUILD_SHARED_LIBS=OFF -D BUILD_PERF_TESTS=OFF -D BUILD_TESTS=OFF -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local \ | |
-D PYTHON3_EXECUTABLE=$(which python3) \ | |
-D PYTHON_INCLUDE_DIR=$(python3 -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())") \ | |
-D PYTHON_INCLUDE_DIR2=$(python3 -c "from os.path import dirname; from distutils.sysconfig import get_config_h_filename; print(dirname(get_config_h_filename()))") \ | |
-D PYTHON_LIBRARY=$(python3 -c "from distutils.sysconfig import get_config_var;from os.path import dirname,join ; print(join(dirname(get_config_var('LIBPC')),get_config_var('LDLIBRARY')))") \ | |
-D PYTHON3_NUMPY_INCLUDE_DIRS=$(python3 -c "import numpy; print(numpy.get_include())") \ | |
-D PYTHON3_PACKAGES_PATH=$(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") \ | |
-D WITH_QT=OFF \ | |
.. | |
make -j2 | |
make install | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment