Making python 3.3 default python 3 interpreter instead of 3.2
You can custom your python3
alias. For this, you can modify your .bashrc
file by appending "alias python3='python3.3'
" at the end of it. This shell script can do it for you :
#!/bin/bash
cd ~
# Create the ~/.bashrc file if it does not exist
if [ ! -f ./.bashrc ]; then
touch .bashrc
chmod 755 .bashrc
echo "#!/bin/bash" >> .bashrc
fi
# Append the customed alias
echo " " >> .bashrc
echo "alias python3='python3.3'" >> .bashrc
echo " " >> .bashrc
# Reload settings in the .bashrc script
source .bashrc
You may run different python versions on the same system by setting up the appropriate environment variables. This would allow you to locally install a later version of Python than the synaptic package manager might offer. e.g. in a file (mysetup) have:
TK_LIBRARY=/usr/lib/python2.7/lib-tk:/usr/lib/python2.7/site-packages/PIL:/usr/lib
TKPATH=/usr/lib/python2.7/lib-tk:/usr/lib/python2.7/site-packages/PIL:/usr/lib
TCL_LIBRARY=/usr/lib
export TCL_LIBRARY TK_LIBRARY TKKPATH
export PYTHONPATH=/usr/lib/python2.7/lib-tk:/usr/lib/python2.7/lib-stdwin:/usr/lib/python2.7/lib-dynload:/usr/lib:.
and put them into your environment with . mysetup