You are not logged in.

#1 2025-09-13 00:46:17

TySpicer
Member
Registered: 2025-08-31
Posts: 144

[SOLVED] Can't install python-pyalsaaudio

I'm trying to install cable. After cloning the repository, navigating into the folder, and running `makepkg -si`, it gave me some missing dependencies. I installed most of them with no issue, but there's still one that's giving me trouble:

==> Missing dependencies:
	-> python-pyalsaaudio

Throughout this process, I've tried `python-pyalsaaudio` and just `pyalsaaudio`, and am getting similar errors with both. For this post, I'll show the error messages from `pyalsaaudio`, since it looks like that's what I'm supposed to use.

First, I tried pacman, and it looks like it's not an official Arch package:

error: target not found: pyalsaaudio

After a quick search, I found the GitHub: https://github.com/larsimmisch/pyalsaaudio/

It recommended using pip. I installed pip, ran `pip install pyalsaaudio`, and it gave me this error:

× This environment is externally managed
╰─> To install Python packages system-wide, try 'pacman -S
    python-xyz', where xyz is the package you are trying to
    install.
    
    If you wish to install a non-Arch-packaged Python package,
    create a virtual environment using 'python -m venv path/to/venv'.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip.
    
    If you wish to install a non-Arch packaged Python application,
    it may be easiest to use 'pipx install xyz', which will manage a
    virtual environment for you. Make sure you have python-pipx
    installed via pacman.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.

So, it looks like I have two options. pipx seemed simpler than the first option. I installed pipx, ran `pipx install pyalsaaudio`, and it gave me this error:

No apps associated with package pyalsaaudio or its dependencies. If you are attempting to
install a library, pipx should not be used. Consider using pip or a similar tool instead.

From the GitHub, I also tried building it manually. After cloning the repository, navigating into the directory, and running the python commands on the GitHub, it actually didn't give me any errors. It looks like everything worked, but I went back to install cable, and it gave me the same issue.

There is the first option pip gave me, I'm just not sure how to interpret it. If I should go with that option, what path should I use for the virtual environment? Once the virtual environment is created, how do I proceed with installing pyalsaaudio?

Am I on the right track here? Should I do something else?

Last edited by TySpicer (2025-09-13 17:49:50)

Offline

#2 2025-09-13 00:51:39

skunktrader
Member
From: Brisbane, Australia
Registered: 2010-02-14
Posts: 1,647

Re: [SOLVED] Can't install python-pyalsaaudio

Why not install this?

Offline

#3 2025-09-13 00:58:11

TySpicer
Member
Registered: 2025-08-31
Posts: 144

Re: [SOLVED] Can't install python-pyalsaaudio

Sure, I'll try it.

(clone, cd, `makepkg -si`)

It looks like it built successfully, but couldn't install:

:: Proceed with installation? [Y/n] y
(2/2) checking keys in keyring                                                                 [########################################################] 100%
(2/2) checking package integrity                                                               [########################################################] 100%
(2/2) loading package files                                                                    [########################################################] 100%
(2/2) checking for file conflicts                                                              [########################################################] 100%
error: failed to commit transaction (conflicting files)
python-pyalsaaudio: /usr/lib/python3.13/site-packages/alsaaudio.cpython-313-x86_64-linux-gnu.so exists in filesystem
Errors occurred, no packages were upgraded.
==> WARNING: Failed to install built package(s).

Offline

#4 2025-09-13 05:33:56

killertofus
Member
Registered: 2025-02-10
Posts: 61

Re: [SOLVED] Can't install python-pyalsaaudio

By overriding the system python while building the package, you have created a huge mess. get rid of it. Then start over with rebuilding the package. Then read this https://wiki.archlinux.org/title/Python … management

Offline

#5 2025-09-13 07:46:22

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,054
Website

Re: [SOLVED] Can't install python-pyalsaaudio

Mod note: moving to AUR Issues


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#6 2025-09-13 15:46:33

TySpicer
Member
Registered: 2025-08-31
Posts: 144

Re: [SOLVED] Can't install python-pyalsaaudio

killertofus wrote:

By overriding the system python while building the package, you have created a huge mess. get rid of it.

This seems a bit vague. What do you mean by "huge mess"? How do I clean it up?

Offline

#7 2025-09-13 16:12:35

loqs
Member
Registered: 2014-03-06
Posts: 18,645

Re: [SOLVED] Can't install python-pyalsaaudio

TySpicer wrote:

From the GitHub, I also tried building it manually. After cloning the repository, navigating into the directory, and running the python commands on the GitHub, it actually didn't give me any errors. It looks like everything worked

This leads to Pacman Failed to commit transaction (conflicting files) error as pacman is not tracking the files installed by your manual installation. So you need to remove those files first or have pacman overwrite them when installing python-pyalsaaudio.

Offline

#8 2025-09-13 16:18:38

TySpicer
Member
Registered: 2025-08-31
Posts: 144

Re: [SOLVED] Can't install python-pyalsaaudio

loqs wrote:

remove those files first

Remove the cloned repository, or the files installed by building? I'm not sure how to uninstall after building a package, how would I go about that?

I assumed there wasn't an official pacman package, based on the "target not found" error. Should I be looking for an official Arch package?

Offline

#9 2025-09-13 16:54:25

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,999
Website

Re: [SOLVED] Can't install python-pyalsaaudio

The ArchWiki link supplied by loqs explains what to do. That is why they linked it. Perhaps try reading it before asking further questions?

EDIT: would you be pleased if your students behaved in this way? :-P

Last edited by Head_on_a_Stick (2025-09-13 16:55:07)


Jin, Jîyan, Azadî

Offline

#10 2025-09-13 16:56:01

loqs
Member
Registered: 2014-03-06
Posts: 18,645

Re: [SOLVED] Can't install python-pyalsaaudio

TySpicer wrote:

I'm not sure how to uninstall after building a package, how would I go about that?

It varies from project to project.

TySpicer wrote:

I assumed there wasn't an official pacman package, based on the "target not found" error.

skunktrader was suggesting using https://aur.archlinux.org/packages/python-pyalsaaudio from AUR which are user supplied and unofficial PKGBUILDs you build yourself. Hopefully skunktrader reviewed and tested the PKGBUILD before suggesting it.

Offline

#11 2025-09-13 17:08:18

TySpicer
Member
Registered: 2025-08-31
Posts: 144

Re: [SOLVED] Can't install python-pyalsaaudio

Head_on_a_Stick wrote:

Perhaps try reading it before asking further questions?

Oops, dumb mistake on my part. I'll take a look at it. Thanks!

Offline

#12 2025-09-13 17:49:28

TySpicer
Member
Registered: 2025-08-31
Posts: 144

Re: [SOLVED] Can't install python-pyalsaaudio

Well, that worked, and was pretty easy! I have cable now! Thanks for the help!

Offline

Board footer

Powered by FluxBB