davidhi7 / ddcci-plasmoid

KDE Plasma widget to adjust the brightness of multiple external monitors
MIT License
409 stars 12 forks source link

running pip install --user ddcci-plasmoid-backend give an error that I can't get arround #41

Closed KarkanAlzwayed closed 1 year ago

KarkanAlzwayed commented 1 year ago

EDIT: Nevermind I ran pip install ddcci-plasmoid-backend --break-system-packages and it worked. Could you please add that in the readme file for arch users, or whomever you think would get this message?

I used to be able to install it just fine, but now the system is not liking pip and it throws this error when I runpip install ddcci-plasmoid-backend

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.

I Have installed pip and tried - still failed I have used pipx (it was suggested when I searched) - still failed Not sure what else I can do to install the ddcci-plasmoid-backend. It is not available anywhere to install

davidhi7 commented 1 year ago

Using --breal-system-packages is really not the optimal solution. What didn't work with pipx?

KarkanAlzwayed commented 1 year ago

With pipx it complains that the package doesn't exist.

davidhi7 commented 1 year ago

Just to make sure does pipx not find the package or does the widget not find the backend? If the latter is true, then you need to set the backend executable command to ~/.local/bin/ddcci_plasmoid_backend.

CatEricka commented 1 year ago

You can always install a local package use pipx install /path/to/this/repo/backend

CatEricka commented 1 year ago

Maybe we should document pipx stuff, because recent distro no longer allow global or user pip installation

KarkanAlzwayed commented 1 year ago

You can always install a local package use pipx install /path/to/this/repo/backend

The issue is that ddcci-plasmoid-backend isn't available to download anywhere when I searched it. Unless it's available under a different name then I don't know.

KarkanAlzwayed commented 1 year ago

Just to make sure does pipx not find the package or does the widget not find the backend? If the latter is true, then you need to set the backend executable command to ~/.local/bin/ddcci_plasmoid_backend.

Both. Widget can't find it because it is not installed and here is what I get when running pipx

 pipx install --user ddcci-plasmoid-backend 
usage: pipx [-h] [--version]
            {install,uninject,inject,upgrade,upgrade-all,uninstall,uninstall-all,reinstall,reinstall-all,list,run,runpip,ensurepath,environment,completions}
            ...
pipx: error: unrecognized arguments: --user
CatEricka commented 1 year ago

You can always install a local package use pipx install /path/to/this/repo/backend

The issue is that ddcci-plasmoid-backend isn't available to download anywhere when I searched it. Unless it's available under a different name then I don't know.

I mean:

git clone https://github.com/davidhi7/ddcci-plasmoid
pipx install ./ddcci-plasmoid/backend/
CatEricka commented 1 year ago

Just to make sure does pipx not find the package or does the widget not find the backend? If the latter is true, then you need to set the backend executable command to ~/.local/bin/ddcci_plasmoid_backend.

Both. Widget can't find it because it is not installed and here is what I get when running pipx

 pipx install --user ddcci-plasmoid-backend 
usage: pipx [-h] [--version]
            {install,uninject,inject,upgrade,upgrade-all,uninstall,uninstall-all,reinstall,reinstall-all,list,run,runpip,ensurepath,environment,completions}
            ...
pipx: error: unrecognized arguments: --user

The right command is pipx install ddcci-plasmoid-backend without --user, pipx always install packages into user's home.

https://pypa.github.io/pipx/docs/

KarkanAlzwayed commented 1 year ago

You can always install a local package use pipx install /path/to/this/repo/backend

The issue is that ddcci-plasmoid-backend isn't available to download anywhere when I searched it. Unless it's available under a different name then I don't know.

I mean:

git clone https://github.com/davidhi7/ddcci-plasmoid
pipx install ./ddcci-plasmoid/backend/

Oh wow. 😂 That's crazy how I missed that.

KarkanAlzwayed commented 1 year ago

Just to make sure does pipx not find the package or does the widget not find the backend? If the latter is true, then you need to set the backend executable command to ~/.local/bin/ddcci_plasmoid_backend.

Both. Widget can't find it because it is not installed and here is what I get when running pipx

 pipx install --user ddcci-plasmoid-backend 
usage: pipx [-h] [--version]
            {install,uninject,inject,upgrade,upgrade-all,uninstall,uninstall-all,reinstall,reinstall-all,list,run,runpip,ensurepath,environment,completions}
            ...
pipx: error: unrecognized arguments: --user

The right command is pipx install ddcci-plasmoid-backend without --user, pipx always install packages into user's home.

https://pypa.github.io/pipx/docs/

I used almost the same command, but I kept adding python to it. I think this whole pipx thing should be added to the readme. So, noobs like me don't get stranded.

CatEricka commented 1 year ago

I used almost the same command, but I kept adding python to it. I think this whole pipx thing should be added to the readme. So, noobs like me don't get stranded.

I created a PR about this issue: #42 , any ideas are welcome :smiley_cat: