You are not logged in.

#1 2020-05-10 06:51:46

babyjoseph
Member
Registered: 2020-05-04
Posts: 16

How to Install Libraries

Is there anyone there who could teach me how to install python libraries, I was planning to install pyaudio with the use of pip, I already successfully installed python and pip but when I initiate the command "pip install pyaudio" , I get this error -> Defaulting to user installation because normal site-packages is not writeable
Collecting pyaudio
  Using cached PyAudio-0.2.11.tar.gz (37 kB)
Installing collected packages: pyaudio
    Running setup.py install for pyaudio ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-9dlzmjsl/pyaudio/setup.py'"'"'; __file__='"'"'/tmp/pip-install-9dlzmjsl/pyaudio/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-ym3wwoyy/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/jbl/.local/include/python3.8/pyaudio
         cwd: /tmp/pip-install-9dlzmjsl/pyaudio/
    Complete output (16 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.8
    copying src/pyaudio.py -> build/lib.linux-x86_64-3.8
    running build_ext
    building '_portaudio' extension
    creating build/temp.linux-x86_64-3.8
    creating build/temp.linux-x86_64-3.8/src
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fPIC -I/usr/include/python3.8 -c src/_portaudiomodule.c -o build/temp.linux-x86_64-3.8/src/_portaudiomodule.o
    src/_portaudiomodule.c:29:10: fatal error: portaudio.h: No such file or directory
       29 | #include "portaudio.h"
          |          ^~~~~~~~~~~~~
    compilation terminated.
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-9dlzmjsl/pyaudio/setup.py'"'"'; __file__='"'"'/tmp/pip-install-9dlzmjsl/pyaudio/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-ym3wwoyy/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/jbl/.local/include/python3.8/pyaudio Check the logs for full command output.

Offline

#2 2020-05-10 06:54:57

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: How to Install Libraries

Don't use language specific package managers to install global packages. YOu're asking for trouble.

https://wiki.archlinux.org/index.php/Pacman
https://wiki.archlinux.org/index.php/Of … positories
https://wiki.archlinux.org/index.php/Ar … Repository

Offline

#3 2020-05-10 07:29:12

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: How to Install Libraries

And learn how to use code tags: https://wiki.archlinux.org/index.php/Co … s_and_code This isn't the first time you have been told...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#4 2020-05-10 08:49:29

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: How to Install Libraries

This indicates you do not have the "portaudio" package installed, pyaudio is a python binding for portaudio and must therefore depend on it.

Fortunately, you can pacman -S community/python-pyaudio, which has a precompiled python module for you that depends on portaudio already. This is why using pacman is better than pip.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

Board footer

Powered by FluxBB