I am running python-2.7 with virtualenv on a unix server to which I do not have root access. I updated the module tornado using pip install tornado --upgrade because installing ipython required tornado >= 3.1.0 but only version 2.4 was installed by default on the server. However, when I try to open ipython, it still complains that I don't have the updated version.
I confirmed that ipython is correctly aliased to the virtualenv, and that the upgrade had indeed produced tornado version 4.0 in the site-packages of the virtualenv.
However if I open python (correctly aliased to the virtualenv) and import tornado, I find that it is importing the earlier version (2.4) and not the newer version from my virtualenv. Importing another package that was only installed on the virtualenv correctly imports it from the site-packages of the virtualenv.
Any idea how I should tell python to use the updated version of tornado by default instead of the earlier version that isn't on the virtualenv?
One really hacky thing that I tried was appending to my virtualenv activate file the following:
PYTHONPATH=path_to_standardVE/lib/python2.7/site-packages/tornado:$PYTHONPATH
If I check $PYTHONPATH upon startup, it indeed contains this path at the front. However, loading the module in python still loads the 2.4 version.
Thanks!