2

I am currently working on a project on my raspberry pi. I am using a couple of libraries. such as pyaudio and wave. I coded it in Pycharm and now I transferred the file to the raspberry pi and using Geany. I want to use those libraries and having a hard time installing them in Geany. On pycharm I would just install it from the settings or pip install it. How can I do it on the raspberri pi?

When I try to install using pip I get the following error:

 command 'arm-linux-gnueabihf-gcc' failed with exit status 1
Cornelius Roemer
  • 3,772
  • 1
  • 24
  • 55
Tomer Cahal
  • 442
  • 1
  • 5
  • 14
  • Open up a command prompt, install and use pip. – kpie Feb 12 '20 at 14:35
  • use a requirements.txt file , then pip install -r requirements.txt. Other solutions are virtialenv + venv-pack or pex – dre-hh Feb 12 '20 at 14:36
  • @kpie I tried doing that but I am getting this error. command 'arm-linux-gnueabihf-gcc' failed with exit status 1. – Tomer Cahal Feb 12 '20 at 14:37
  • @dre-hh I got the same error. Failed building wheel for pyaudio – Tomer Cahal Feb 12 '20 at 14:40
  • 2
    https://stackoverflow.com/questions/48135955/by-installing-pyaudio-python3-on-my-raspberry-pi-3-noobs-i-get-an-error-how – kpie Feb 12 '20 at 14:41
  • ok.. you have compiled libs. venv-pack and pex wil be not option here. as those libs compile a c extension. you need to compile everything again on the pi as it is using an arm cpu and your computer is x86_64. Or there is some cross-compilation tooling. – dre-hh Feb 12 '20 at 14:44
  • easiest would be doing pip intall same libs with a requirements.txt on the pi as it will trigger compilation. Check the above link, probably you are missing some dev c-lib on the pi, and the compilation fails. The actuall error from gcc is logged in into a file and there must be more hints printed, when just `gcc failed` – dre-hh Feb 12 '20 at 14:46
  • Thank you @kpie one of the answers over there worked! – Tomer Cahal Feb 12 '20 at 16:09
  • Does this answer your question? [Installation of PyAudio on Raspberry pi 3 fails with gcc error](https://stackoverflow.com/questions/48135955/installation-of-pyaudio-on-raspberry-pi-3-fails-with-gcc-error) – Cornelius Roemer Feb 13 '23 at 23:31

0 Answers0