Page 1 of 1

Ask a question about modifying PATH?

Posted: Fri May 29, 2020 12:00 am
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

Re: Ask a question about modifying PATH?

Posted: Fri May 29, 2020 3:37 am
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.

Re: Ask a question about modifying PATH?

Posted: Fri May 29, 2020 12:32 pm
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