PythonAnywhere Forums

latest python in virtualenv

I created a new 2.7 virtualenv today, it worked fine except it's python version 2.7.6 while I have been developing on 2.7.12. I tried virtualenv -p /usr/bin/python2.7.12 myvename but got "the executable does not exist"

Is it possible to upgrade? Or to create a new venv on 2.7.12? Thanks.

(also, I got a SNIMissingWarning and InsecurePlatformWarning when using pip, although it successfully downloaded and installed everything in my requirements.txt)

Virtualenvs do not contain a different version of Python, they use the one installed already. We do not, at the moment, have any way for you to change the version of Python because that would break everyone's virtualenvs. We are working on a feature that would allow it in future and we hope to have that available soon.

You can fix the warnings by doing:

pip install urllib3[secure]

in you virtualenv

Hi Glenn,

I am attempting to resolve the SNIMissingWarning and InsecurePlatformWarning thrown by urllib3 under Python 2.7.6 installed on PythonAnywhere. I would also really, really like to run 2.7.12 if possible.

I followed your instruction above but installing the secure option on urllib3 didn't resolve the warnings for me.

It seems like anyone doing outgoing connections from their PA app under Python 2.7 would experience this same issue.

Just to be clear, this is the issue I'm referring to -

Thank you,


Hi Taylor,

This used to be solved by installing urllib3[secure]. However, the newest version of pip (<1 month ago) broke this. See here. We are monitoring/waiting to see if this will get fixed soon before deciding what to do about it.

Conrad — Thank you, I'll subscribe to that! I hadn't seen this yet. In the meantime, is it possible for me to selectively ignore them? I've never tried to drop my log level for just one package, but it's really blowing up my Opbeat account / email / push notifications. Over 100 instances of the same error since I posted.

I think there is a way of suppressing those warnings selectively... Check this link?

Great find, Harry. I'll give that a shot.