From 8879e67be743c8b1caee05c6098d3d6387461242 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 17 Jun 2010 15:18:03 -0400 Subject: [PATCH] Automatically adjust PYTHONPATH for locally installed Python version. --- _bashrc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/_bashrc b/_bashrc index 35ebae2..ffc398d 100644 --- a/_bashrc +++ b/_bashrc @@ -14,7 +14,8 @@ export LD_LIBRARY_PATH=~/lib export TEXINPUTS=":.:$HOME/projects/latex/common/" # personalize python path -export PYTHONPATH=".:$HOME/lib/python:$HOME/lib/python2.5/site-packages:$HOME/.python" +PYTHON_VERSION=$(python -c 'import sys; print ".".join([str(i) for i in sys.version_info[:2]])') +export PYTHONPATH=".:$HOME/lib/python:$HOME/lib/python$PYTHON_VERSION/site-packages:$HOME/.python" # append personal manpages to manpath export MANPATH=":$HOME/share/man" -- 2.26.2