Update: The below no longer applies. A fix has been released. (So you can undo any ugly hack you used in order to make it work.)
Dear Python developers,
when upgrading to Ubuntu 9.04 (Jaunty Jackalope, which is to be released in 22 days from now) please keep in mind that python-virtualenv (the tool we all know and love) is broken. It still works with python2.5, though.
While trying to resolve this issue I had several ideas:
I am not sure whether this will wreak further havoc, so please be cautious. I hope that we can get this fixed until Jaunty is released. There is a bug report.
Just letting you know. Took me some time to realize.
| 6 comments | Apr 1, 2009 1:45:00 PM | planet-ubuntu |
I use APTonCD for creating an offline repo of the cached apt packages. It works with Python 2.5 , but Jaunty includes 2.6 which makes this package useless. Dependency failure is what I get every time I try to install my fav application.
There needs to be some way out of this mess. Most of the Python based Frameworks,Toolkits are build for 2.5 and most of them arn’t available for 2.6.
Another work around, which might not be as ugly, is to go into the executable of Virtualenv and change the ‘#!/usr/bin/python’ to ‘#!/usr/bin/python2.5′. This has worked on a couple of applications for me during the 2.5->2.6 upgrade in Jaunty.
These would be poor solutions. If you need to setup a virtualenv and don’t mind using python2.5 simply tell virtualenv to use the python2.5 binary. Everything will work perfectly if you do that. Example: virtualenv –python=python2.5 py25-ve
It’s ugly, without doubt.
@nixternal: That’s probably the less ugly way, but still ugly (as you already mentioned).
@Gavin Carothers: I totally agree. They are not solutions, but ugly workarounds. You are not the first to mention such a parameter. My installation of virtualenv (via apt) does not have a -python, -p or –python parameter though. In addition to that, the workaround you propose does not work if some script (I had that case with a bootstrap script) just uses virtualenv. You’d need to adjust that script as well.
1) virtualenv in Ubuntu is in some ancient version (1.1 or even 1.0) and it doesn’t even work with standard python 2.6 installation, it also doesn’t have -p/–python flag.. 2) Maintainers of Python 2.6 in Ubuntu (or even Debian - I’m not sure who made those changes) had additionally patched python and setuptools to fix some issues (tinyurl.com/dm9y4g) and broken virtualenv completely.. I guess there are no Python developers in MOTU group.. ;)
i agree with you when you said that there are no solution…that said several people and i think than anybody have solved this problem yet… so we have to wait. bye