'Is there a way to set PYTHONPATH permanently?
Every day, when I open an Ubuntu terminal and want to run a python project, I have to run previously export PYTHONPATH=$(pwd). Is there a way to avoid doing this every time I switch on my computer? Is there a way to set my PYTHONPATH permanently for that project?
Solution 1:[1]
Put the following line in your ~/.bashrc file:
export PYTHONPATH=/the/location/of/the/path
Solution 2:[2]
Have you try adding the line you mention
export PYTHONPATH=$(pwd)
to ~/.bashrc or ~/.profile?
Solution 3:[3]
You should be able to set it permanently through the ~/.bashrc file or ~/.profile file for your user. Just enter the line you showed into either of those files.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | I break things |
| Solution 2 | tax evader |
| Solution 3 | binds |
