Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 1 down vote accepted

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.

share|improve this answer
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 posting your answer, you agree to the privacy policy and terms of service.

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