Actions
Building Exiv2 v0.26 + Python 3.6.4 + Py3Exiv2 v0.1.0 on Centos¶
1) Install Development Tools on CentOS¶
1.a) Update the system and install the development tools¶
sudo yum -y update sudo yum -y install yum-utils sudo yum -y groupinstall development
2) Build and test exiv2¶
2.a) Install dependent libraries:¶
sudo yum -y install expat-devel sudo yum -y install zlib-devel
2.b) Install tools required for the Exiv2 test suite¶
sudo yum -y install subversion sudo yum -y install dos2unix sudo yum -y install curl
2.c) Get the code¶
http://www.exiv2.org/download.html
2.d) Install the code into the build tree¶
mkdir -p ~/gnu/exiv2
Copy the source into: ~/gnu/exiv2/exiv2-trunk
2.e) Build it¶
http://dev.exiv2.org/projects/exiv2/wiki/How_do_I_build_Exiv2_on_the_XYZ_platform
cd ~/gnu/exiv2/exiv2-trunk ./configure make sudo make install
2.f) Run the test suite (optional)¶
export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:/usr/lib/pkgconfig" svn export svn://dev.exiv2.org/svn/tags/0.26/test # once only make samples make tests
3) Build and install python 3.6.4¶
3.a) Get the code¶
https://www.python.org/downloads/
3.b) Install the code into the build tree¶
mkdir ~/gnu/python
Copy the source into: ~/gnu/python/Python-3.6.4
3.c) Built and install python3.6.4¶
cd ~/gnu/python/Python-3.6.4 ./configure make sudo make install
3.d) Create a link to use python3¶
sudo ln -s /usr/local/bin/python3.6 /usr/local/bin/python3
4) Build and install boost¶
4.a) Get the code from http://www.boost.org/users/download/¶
mkdir ~/gnu/boost
Copy the source into: ~/gnu/boost/boost_1_66_0
4.b) Build and install boost¶
cd ~/gnu/boost/boost_1_66_0 export BOOST_LIBRARYDIR=$PWD/libs export BOOST_ROOT=$PWD export CPLUS_INCLUDE_PATH=/usr/local/include/python3.6m export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib" ./bootstrap.sh --with-python=/usr/local/bin/python3.6 ./b2 sudo $PWD/b2 install
5) Build and test py3exiv2¶
5.a) Get the code from https://pypi.python.org/pypi/py3exiv2/0.1.0¶
mkdir ~/gnu/py3exiv2
Copy the source into: ~/gnu/py3exiv2/py3exiv2-0.1.0
5.b) Build and install py3exiv2¶
cd ~/gnu/py3exiv2/py3exiv2-0.1.0 sudo /usr/local/bin/python3.6 setup.py install
5.c) Test py3exiv2¶
curl -O http://clanmills.com/Stonehenge.jpg python3.6 import pyexiv2 image=pyexiv2.ImageMetadata(Stonehenge.jpg) # image on your computer image.read() image.exif_keys ... lots and lots of lovely output ...
6) To run in a clean shell¶
6.a) Set LD_LIBRARY_PATH¶
I recommend you set this in ~/.login
or ~/.bashrc
or ~/.profile
so that its "always set"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib"
6.b) Run python3¶
python3 import pyexiv2 help(pyexiv2)
Updated by Robin Mills over 3 years ago · 7 revisions