Frequent Question: How Do I Permanently Set Pythonpath in Linux?
Contents Type Open. Bash_Profile. in the Text File That Pops Up, Add This Line at the End: Export Pythonpath=$Pythonpath: Foo/Bar. Save the File, Restart the...
Contents
Type open . bash_profile. In the text file that pops up, add this line at the end: export PYTHONPATH=$PYTHONPATH:foo/bar. Save the file, restart the Terminal, and you’re done.
How do I permanently set Pythonpath?
Setting PYTHONPATH more permanently
- Open Terminal.app ;
- Open the file ~/.bash_profile in your text editor – e.g. atom ~/.bash_profile ;
- Add the following line to the end: export PYTHONPATH=”/Users/my_user/code”
- Save the file.
- Close Terminal.app ;
- Start Terminal.app again, to read in the new settings, and type this:
Must Read
How do I permanently set my PATH in Linux?
To make the change permanent, enter the command PATH=$PATH:/opt/bin into your home directory’s . bashrc file. When you do this, you’re creating a new PATH variable by appending a directory to the current PATH variable, $PATH .