Announcement

Collapse
No announcement yet.

PATH warning on pip installation

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    PATH warning on pip installation

    "WARNING: The script liquidctl is installed in '/home/profilename/.local/bin' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location."

    Does that mean I need to add that directory into PATH for the program to work or is that just an info?

    How would I add a directory to PATH?

    #2
    you could always just make a symbolic link of a file to a path directory, such as /usr/bin/
    sudo ln -s '/home/profilename/.local/bin/liquidctl /usr/bin/liquidctl
    or you can set your path permanently this way:
    https://opensource.com/article/17/6/set-path-linux
    To avoid rebooting or logging out, after editing any file to add paths, source that file to update the environment:
    for example, if you were to edit the file .profile :
    source .profile
    Last edited by rab0171610; May 15, 2022, 12:30 AM.

    Comment


      #3
      You could also try running the file and see if the error is false. When I use:
      echo $PATH
      the .local/bin is in my path. You can check and see if it actually is in your path or just run it to see if it works. If it does not, it will say command not found or similar. Or you can run it directly from its full path instead:
      /home/profilename/.local/bin/liquidctl
      My preferred method for scripts or bin files not in path is just to make a symbolic link in /usr/bin/ like I stated in my first response. But there are various methods of handling it, depending on the user and the setup.

      Comment


        #4
        Ubuntu specific post on adding paths to your environment:
        https://askubuntu.com/questions/6021...ry-to-the-path

        Comment


          #5
          So it would be: export PATH=$PATH:/home/profilename/.local/bin/liquidctl ?

          I dont get the symbolic link. Shouldnt every PATH be permanent to work?

          Actually /home/profilename/.local/bin is already there in path so I dont get why it is needed to be extended by liquidctl, I just dont get that thing to run and Kubuntu is the 2nd distri I was trying to run it on.

          Also since /home/profilename/.local/bin is already in path I dont get why it says it needs liquidctl in there when it puts in into the path that is already there.
          Last edited by Fred-VIE; May 15, 2022, 12:48 AM.

          Comment


            #6
            According to post 411:
            411




            Edit .bashrc in your home directory and add the following line:

            export PATH="/path/to/dir:$PATH" You will need to source your .bashrc or logout/login (or restart the terminal) for the changes to take effect. To source your .bashrc, simply type

            $ source ~/.bashrc
            If this is correct, then don't forget the quotes.
            After using the source command, use:
            echo $PATH
            to see if it was added.

            Comment


              #7
              no specific line where I should add it? So I could just put it on top?

              Comment


                #8
                You can, I always add to the bottom after aliases, and a comment so I can remove things I added if necessary:

                #added by rab to add .local/bin to my path
                export PATH="/home/profilename/.local/bin:$PATH"

                and don't forget the quotes
                and you won't need the file name in the path, just the parent directory so omit liquidctl from PATH="$PATH:/home/profilename/.local/bin/liquidctl" and move $PATH to the end after ':'
                I didn't catch that earlier.
                so the export PATH="/path/to/dir:$PATH" with a comment should read like so in your .bashrc:

                #Put your comment here
                export PATH="/home/profilename/.local/bin:$PATH"

                according to post 411

                and after putting those two lines at the end of .bashrc, don't forget to issue:

                source .bashrc
                Last edited by rab0171610; May 15, 2022, 01:17 AM.

                Comment


                  #9
                  Well the path is there, liquidctl still says "permission denied" on everything I should do from here. :/

                  So I guess that path thing was not the root cause to begin with.

                  Slowly I get the feeling that the pip installation is the problem.
                  Last edited by Fred-VIE; May 15, 2022, 01:16 AM.

                  Comment


                    #10
                    I edited my last post, double check that you made the changes to the lines in your .bashrc to read as follows:

                    #Put your comment here
                    export PATH="/home/profilename/.local/bin:$PATH"

                    You had it wrong, there was no export in the line, the $PATH was at the beginning, and there were no quotes. Make sure and then try again.
                    If after updating .bashrc and issuing:

                    source .bashrc

                    It still does not work, check your permissions on your file to make sure that it is executable and that you are the owner. Let me know if you need help with that.
                    Last edited by rab0171610; May 15, 2022, 01:24 AM.

                    Comment


                      #11
                      Now I'm totally confused /home/profilename/.local/bin was in my PATH to begin with which I mentioned in #5.

                      Thats why I didnt understand in the first place why the pip install said it is not.
                      Last edited by Fred-VIE; May 15, 2022, 01:36 AM.

                      Comment


                        #12
                        Dumb question, I am assuming you changed profilename in the path to your user name? If that didn't work, try running the program as root or with sudo.

                        Comment


                          #13
                          yea I put my profile name in there instead of profilename. But it is a valid question because the first times I tried things I kinda missed that one and screwed up alot.

                          Sudo doesnt work with liquidctl for me neither on Mint nor Kubuntu. It says it doesnt know the command when I use sudo. Totally weird.

                          After installing liquidctl I had to put the rules into a folder and then use "udevadm control --reload" (which gives me an "access denied" error and unadevdm trigger (didnt try that since the first one gives the error already)
                          Last edited by Fred-VIE; May 15, 2022, 01:45 AM.

                          Comment


                            #14
                            Just out of curiosity, what are the steps you are using to run this command? running from the command line? if so using what command?

                            Comment


                              #15
                              I installed liquid ctl via pip install liquidctl (that supposedly does it with all the dependencies)
                              Then I had to copy the rules: https://github.com/liquidctl/liquidc...n-failed-linux
                              Then I would have to use the commands I just mentioned:
                              udevadm control --reload (on this one I get the "access denied" error alrady and thats where I'm stuck)
                              udevadm trigger is the last command before I could list the devices and initialize the device(s).

                              All that is supposed to work without sudo (except the installation and the copying of the rules ofc).
                              If I use sudo with the undevadm control --reload then it does and says nothing.

                              Yea it's all done in the console. Cant even copy the rules via Dolphin because it wont let you access the folder.

                              Oh yea and I logged out/in after putting the rules where they belong. Well I restarted as well with the GPU driver change.

                              Hmm after manually checking dependencies I found that the pip install did not install them all. I guess I give up, thats just too much. I can only see it with synaptic package manager but cant find the packages in Discover (Software Center). I fear I'll break Linux again.
                              Last edited by Fred-VIE; May 15, 2022, 02:44 AM.

                              Comment

                              Working...
                              X