4

I have a problem when installing the python module for gammu on a raspberry pi model b+. How can i solve this problem ? Thanks!

pi@raspberrypi ~ $ sudo pip install python-gammu
Downloading/unpacking python-gammu
  Running setup.py egg_info for package python-gammu
    Package gammu was not found in the pkg-config search path.
    Perhaps you should add the directory containing `gammu.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'gammu' found
    Traceback (most recent call last):
      File "<string>", line 14, in <module>
      File "/home/pi/build/python-gammu/setup.py", line 108, in <module>
        check_minimum_gammu_version()
      File "/home/pi/build/python-gammu/setup.py", line 43, in check_minimum_gammu_version
        "gammu"
      File "/usr/lib/python2.7/distutils/spawn.py", line 34, in spawn
        _spawn_posix(cmd, search_path, dry_run=dry_run)
      File "/usr/lib/python2.7/distutils/spawn.py", line 167, in _spawn_posix
        (cmd[0], exit_status)
    distutils.errors.DistutilsExecError: command 'pkg-config' failed with exit status 1
    Complete output from command python setup.py egg_info:
    Package gammu was not found in the pkg-config search path.

Perhaps you should add the directory containing `gammu.pc'

to the PKG_CONFIG_PATH environment variable

No package 'gammu' found

Traceback (most recent call last):

  File "<string>", line 14, in <module>

  File "/home/pi/build/python-gammu/setup.py", line 108, in <module>

    check_minimum_gammu_version()

  File "/home/pi/build/python-gammu/setup.py", line 43, in check_minimum_gammu_version

    "gammu"

  File "/usr/lib/python2.7/distutils/spawn.py", line 34, in spawn

    _spawn_posix(cmd, search_path, dry_run=dry_run)

  File "/usr/lib/python2.7/distutils/spawn.py", line 167, in _spawn_posix

    (cmd[0], exit_status)

distutils.errors.DistutilsExecError: command 'pkg-config' failed with exit status 1

----------------------------------------
Command python setup.py egg_info failed with error code 1 in /home/pi/build/python-gammu
Storing complete log in /root/.pip/pip.log
Morgan Thrapp
  • 9,748
  • 3
  • 46
  • 67
drled
  • 149
  • 1
  • 2
  • 9

2 Answers2

1

I was able to solve this problem by installing a complete new version of rasbian.

drled
  • 149
  • 1
  • 2
  • 9
1

I had exactly the same promblem, and even updating to the most recent version of Raspbian (2016-05-27-raspbian-jessie) didn't solve it (as suggested by OP).

On the fresh system I ran

sudo apt-get update
sudo apt-get install gammu
sudo gammu-config
pip install python-gammu

and that then fails with the same error message as the OP has posted.

However, the way to go seems to run

sudo apt-get install python-gammu

instead. This installs python-gammu into python2 - in python3 gammu is missing. No solution for that yet.

ralfiii
  • 584
  • 4
  • 13