I downloaded the latest pyexiv2 files: pyexiv2-0.3.2.tar.bz2 and I looked at the README file which said:

To build and install the library, while in the top-level directory
(e.g. '~/dev/pyexiv2', which should contain a file named 'SConstruct'),
run the following commands:

 $ scons
 $ scons install # as administrator, e.g. `sudo scons install`

The result of the build is a dynamic library, libexiv2python.so, in the build/
directory. This is the low-level binding. It is in turn used in a higher level
module, pyexiv2.
The install command installs the two modules in your site-specific directory for
Python modules (e.g. '/usr/lib/python2.7/dist-packages/' on Linux).

I did exactly this, su (now running as root)

cp -r 'pyexiv2-0.3.2' ~

Then ran: scons

It said:

scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
o build/exiv2wrapper.os -c -fPIC -I/usr/include/python2.6 src/exiv2wrapper.cpp
sh: o: command not found
o build/exiv2wrapper_python.os -c -fPIC -I/usr/include/python2.6 src/exiv2wrapper_python.cpp
sh: o: command not found
o build/libexiv2python.so -shared build/exiv2wrapper.os build/exiv2wrapper_python.os -lboost_python -lexiv2
sh: o: command not found
scons: done building targets.

Any ideas where to go from here?


Something is broken in your scons installation or you don't have g++ installed. Working from the same source, scons reports:

g++ -o build/exiv2wrapper.os -c -fPIC -I/usr/include/python2.7 src/exiv2wrapper.cpp

for me. I'd look in /usr/lib/scons/SCons/Tool/g++.py or even just try

$ g++ --version

to see where the error is. If g++ is not installed, install it. If scons support files are broken, it is probably easier to reinstall it than debug it.

  • Thanks I did need g++ installed. It didn't fix my issue but It narrows down my search. Thanks. I just used: yum install gcc-c++ – BubbleMonster Sep 8 '13 at 11:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.