Skip to content

Commit

Permalink
fallback to regular pip install if uv pip fails
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelveldt committed Sep 23, 2024
1 parent 34d271d commit 3da0529
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions music_assistant/server/helpers/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,20 @@ async def install_package(package: str) -> None:
args = ["uv", "pip", "install", "--no-cache", "--find-links", HA_WHEELS, package]
return_code, output = await check_output(*args)

if return_code != 0 and "Permission denied" in output.decode():
# try again with regular pip
# uv pip seems to have issues with permissions on docker installs
args = [
"pip",
"install",
"--no-cache-dir",
"--no-input",
"--find-links",
HA_WHEELS,
package,
]
return_code, output = await check_output(*args)

if return_code != 0:
msg = f"Failed to install package {package}\n{output.decode()}"
raise RuntimeError(msg)
Expand Down

0 comments on commit 3da0529

Please sign in to comment.