[MapProxy] Update notice for Python 2.6.8/2.7.3 with virtualenv
Oliver Tonnhofer
olt at omniscale.de
Mon Oct 29 01:55:00 PDT 2012
Hi all,
I have a notice for all MapProxy users that use virtualenv and are upgrading to Python 2.6.8 or 2.7.3 (check if your system makes auto-updates!). Normally, Python updates should not harm any existing virtualenvs, but they do with this version step.
What is the issue?
You will see errors like the following when starting MapProxy:
[...]
File "/usr/lib/python2.6/tempfile.py", line 34, in <module>
from random import Random as _Random
File "/usr/lib/python2.6/random.py", line 47, in <module>
from os import urandom as _urandom
ImportError: cannot import name urandom
Description and solution from http://pypi.python.org/pypi/virtualenv:
Python bugfix releases 2.6.8, 2.7.3, 3.1.5 and 3.2.3 include a change that will cause "import random" to fail with "cannot import name urandom" on any virtualenv created on a Unix host with an earlier release of Python 2.6/2.7/3.1/3.2, if the underlying system Python is upgraded. This is due to the fact that a virtualenv uses the system Python's standard library but contains its own copy of the Python interpreter, so an upgrade to the system Python results in a mismatch between the version of the Python interpreter and the version of the standard library. It can be fixed by removing $ENV/bin/python and re-running virtualenv on the same target directory with the upgraded Python.
Regards,
Oliver
--
Oliver Tonnhofer | Omniscale GmbH & Co KG | http://omniscale.de
http://mapproxy.org | https://github.com/olt | @oltonn
More information about the MapProxy
mailing list