Python Forum
/home/pi/.local/bin is not on PATH
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
/home/pi/.local/bin is not on PATH
#1
I installed w1thermsensor and it says that
library /home/pi/.local/bin is not on PATH and I should consider adding it.
Should I add it to $PATH or should I call sys.path.extend(['/home/pi/.local/bin',])
As far as I understand $PATH is for the whole raspberry system and the 'sys.path extend' is for the Python installation only?
Reply
#2
Add it to $PATH, for example in the ~/.bashrc file, use
Output:
export PATH="$HOME/.local/bin:$PATH"
$PATH is not related to Python. It is the list of directories where the system looks for executable programs.
Reply
#3
(Feb-07-2021, 10:09 PM)Gribouillis Wrote: Add it to $PATH, for example in the ~/.bashrc file, use
Output:
export PATH="$HOME/.local/bin:$PATH"
$PATH is not related to Python. It is the list of directories where the system looks for executable programs.

I installed w1thermsensor and it ended up in directory '/home/pi/.local/bin'. If I'm only going to access w1thermsensor from a Python program wouldn't it be enough to append the directory to sys.path?
Reply
#4
From what I read on the web, w1thermsensor is both a CLI tool and a python package. This is often the case with Python libraries that come with an executable program. The CLI program was installed in ~/.local/bin but the Python package was installed in some other place. You don't need to add the bin directory to sys.path. It would be an abnormal configuration. Try this to see where Python stored the library:
import w1thermsensor
print(w1thermsensor)
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  WebDriverException: Message: 'PATH TO CHROME DRIVER' executable needs to be in PATH Led_Zeppelin 1 2,213 Sep-09-2021, 01:25 PM
Last Post: Yoriz
  Home Directory pgoosen 9 6,403 Oct-15-2020, 12:37 PM
Last Post: DeaD_EyE
  Add path to a local file in pop-up field pythonscripting 1 1,646 Feb-08-2020, 10:57 PM
Last Post: Larz60+
  .pth file does not show up in sys.path when configuring path. arjunsingh2908 2 5,768 Jul-03-2018, 11:16 AM
Last Post: arjunsingh2908

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020