Ask a question about modifying PATH?

Discussion of programming related topics
Post Reply
wove
Posts: 1189
Joined: Mon May 04, 2020 4:47 pm

Ask a question about modifying PATH?

Post by wove »

I installed a python script with pip3 install and it actually worked. However I got a message saying that ~/.local/bin was not in my PATH.

So to run the script I can use export PATH=/home/wove/.local/bin:Path which lets me work the command until I exit the terminal. If later I open the terminal to use the commands again, I get "dptrp1 not found" and I have to use the export Path again before I can run the command.

Can someone tell me how to add that PATH so it is permanent?

thanks
bill
User avatar
tlmiller
Posts: 4848
Joined: Tue Jan 16, 2018 12:29 pm
Location: AZ, USA

Re: Ask a question about modifying PATH?

Post by tlmiller »

You don't say what OS you're using, and there's multiple ways, so the most generic is to add the PATH to your .bashrc

Code: Select all

export PATH=$PATH:/new/path/to/add
Then either re-source the file, or just log off and back on.
wove
Posts: 1189
Joined: Mon May 04, 2020 4:47 pm

Re: Ask a question about modifying PATH?

Post by wove »

Thanks, I had gotten the path part correct, the part I had missed was the logging out and logging back in.

This is a case where one can give proppers to Ubuntu developers who have ~/.local/bin/ in the path statement out of the box, so once the script is installed it just starts working. Debian does not have the directory in the path statement.

thanks again
bill
Post Reply