I am trying to install python-vosk system wide in Manjaro XFCE, as I want to launch a software that needs vosk. I know that it is recommended to use pacman -S python-vosk (or vosk-bin, etc) but I couldn’t find the package, so I am forced to install it with venv. The problem, is that now I need to activate the venv to launch the software every time. Am I missing something?
Is this really the way to do so? Why did it become so complicated in Manjaro to install python packages? It was so much easier to do so before with just pip…
Thanks, I did the pipx install… and says it is installed successfully, but somehow I get the same error: AttributeError: module ‘vosk’ has no attribute ‘SetLogLevel’. Not sure why…
I created a script to run “source venv vosk & launch command & deactivate” as a workaround, but not optimal.
Yeah, thanks for pointing it out, my phrasing was poor… but your comment doesn’t bring much to the discussion. Can it be installed system-wide from the AUR? If so, would it be better than using pipx, or would it lead to the same result?
Don’t get blinded by the package manager and AUR - you don’t have to.
Repeating myself - advise from above
sudo pacman -Syu pipx
pipx install vosk
Using pipx - you install from pypi and it works for vosk too - it is installed systemwide in the sense it can be run from any commandline - but it is not installed for other users on a multihomed system
pipx — Closely related to pip, but creates, for the user running it, an isolated environment for each application and its associated packages, preventing conflicts with system packages. Focused on packages that can be run from the command line directly as applications. You can use pipx to install packages from the Python Package Index and other indexes.
It’s basically the same as installing it from the repos, but requires more knowledge to be safe. It sounds like you don’t know much about using the AUR, so perhaps best to stick with pipx.
Ok, so it seems there must be some error on the main py script I am using, which depends on vosk; somehow there is a problem when vosk is installed with pipx, but not in venv… not sure why. I will check into that.
So if you need to create an instance of vosk - usable like regular python-packages installed from the repo - you will need to install it to site-packages, which - at any point in time - may create package manager conflicts if files installed by vosk is also installed by another repo package.