2

I know there are plenty of questions related to PYTHONPATH but I couldn't find any answers to this specific problem.

I'm using Mac OS X Mountain Lion and just created my .bashrc file in my home directory (~/.bashrc) using the vi editor. I added the following line to the PYTHONPATH:

export PYTHONPATH=$PYTHONPATH:/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages

After this, when I do an echo of the PYTHONPATH, I get the above directory. Everything is hunky dory until...I quit the terminal and reopen it. That's when things get weird. I type in echo $PYTHONPATH and get a blank space!

Any advice on this issue?

ragzputin
  • 397
  • 3
  • 5
  • 20
  • Are you sure other stuff in .bashrc is running? Does it have +x permissions? – Not_a_Golfer Dec 16 '14 at 15:44
  • 1
    could this be the issue? http://stackoverflow.com/questions/7780030/how-to-fix-terminal-not-loading-bashrc-on-os-x-lion – Not_a_Golfer Dec 16 '14 at 15:45
  • I just added a .bashrc file to my ~/ (Home) folder. So I don't get any errors per se. And the current settings for .bashrc are -rw-r--r--. So no +x permissions. Would +x permissions make any differences? – ragzputin Dec 16 '14 at 16:32

2 Answers2

0

By googling your problem, I found this post which should give you an explanation and a solution to your problem: https://apple.stackexchange.com/questions/119711/why-mac-os-x-dont-source-bashrc

Community
  • 1
  • 1
Pyglouthon
  • 552
  • 4
  • 15
0

You could put that line in your ~/.bash_profile file, at which point it is run each time a new terminal is opened. (See here for more about this file).

yolk
  • 1