If you haven't closed the terminal window/logged out, you need to run
source .bashrc. Running pipx ensurepath should have said something
like that.
(logged out and in to get updated PATH)
Looking at the package, no wonder it fails. musicpy doesn't contain
anything that can be executed. So pipx run can't work for obvious
reasons. You'll have to install it with pipx install and use it in a
python script.
https://pypi.org/project/musicpy/
Traceback (most recent call last):import musicpy
That's the point of venv's. pipx runpip should do the trick. Or the
classic way: source path/to/venv/bin/activate. That way you activate
the position virtual environment (venv) created in that directory
with all packages installed in that venv.
Pretty much just what pipx does.
A packages documentation is always your best friend: https://pypi.org /project/idle/
Also, python script isn't a necessarily a standalone executable. And
also, you shouldn't just wildly mix pipx commands with pip commands
if you don't know what you are doing. Either create a venv with
python3 -m venv or use pipx, not both. Once created, stick to these
separate paths. And read the documentation of pipx while you're at
it. Sure, venvs are easy to handle, as you can just delete them and
start from scratch, but mixing commands without knowing what one is
doing is just a recipe for desaster.
On Sat, Jun 1, 2024, 23:50 Richmond <dnomhcir@gmx.com <mailto:dnomhcir@gmx.com>> wrote:
Richard <rrosner5@gmail.com <mailto:rrosner5@gmail.com>> writes:
> A packages documentation is always your best
friend: https://pypi.org
> /project/idle/
>
Yes it makes it look easy there, but:
import idle
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File ".local/pipx/shared/lib/python3.11/site-packages/idle.py",
line 4, in <module>
from layout import *
ModuleNotFoundError: No module named 'layout'
That's what I'm talking about. You wildly mix commands together that
don't go together. And whatever is off with your paths. Things of pipx installed packages should be in .local/bin and .local/shared/pipx. At
least on Debian that's the default. No idea what you did.
That's how its done. Also, complaining here about something that
doesn't even work on other distros and thus can't be a Debian problem doesn't make that much sense.
python3 -m venv venv
source venv/bin/activate
pip install musicpy
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 546 |
Nodes: | 16 (2 / 14) |
Uptime: | 00:11:08 |
Calls: | 10,385 |
Calls today: | 2 |
Files: | 14,057 |
Messages: | 6,416,566 |