I've been struggling with this problem for a few days now, and can't seem to find an answer anywhere.
I need to run the numpy package from Python2.7, and have thus installed Python 2.7 on my Bluehost account (as per the Bluehost instructions). Then, I used python2.7 easy_install to install numpy in the correct site-packages folder. Calling 'python' from the command line shows that Python2.7 is called, and numpy can be imported without issues.
However, when I call a python script from my site (i.e. using a CGI form), I see it calls python2.6 instead, and can't import numpy anymore.
I suspect there's a problem with my .bashrc, which is as follows: # .bashrc
# User specific aliases and functions
alias mv='mv -i'
alias rm='rm -i'
alias cp='cp -i'
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# Python stuff
export PATH=$HOME/python/Python-2.7.2/:$PATH
export PYTHONPATH=$HOME/python/lib/python2.7/site-packages:$PYTHONPATH
Does the web server CGI shebang need to point to my own installation of Python ?
Cheers, Hugh