[TriZPUG] managing python versions as well as package versions, or "up-to-speed for the ecosystem"

Tom Roche Tom_Roche at pobox.com
Fri Aug 5 04:39:36 CEST 2011

Tom Roche Wed, 03 Aug 2011 15:52:15 -0400
>>> $ lsb_release -ds
>>> > Ubuntu 10.04.3 LTS
>>> $ uname -rv
>>> > 2.6.32-33-generic #71-Ubuntu SMP Wed Jul 20 17:27:30 UTC 2011
>>> $ python --version
>>> > Python 2.6.5

>>> I'm trying to fix a doc problem on a site that uses yatiblog, but

>>> $ pip install yatiblog
>>> ...
>>> > VersionConflict: (docutils 0.6 (/usr/lib/pymodules/python2.6), Requirement.parse('docutils>=0.7'))

>>> which I take to mean that "yatiblog requires docutils>=0.7, and
>>> docutils>=0.7 requires python>2.6" (esp since I get the same dopeslap
>>> from

>>> $ pip install 'docutils>=0.7'
>>> ...
>>> > VersionConflict: (docutils 0.6 (/usr/lib/pymodules/python2.6), Requirement.parse('docutils>=0.7'))

Chris Calloway Wed, 03 Aug 2011 17:02:50 -0400
> Nothing I'm seeing here suggests that you need python>=2.7 in order to
> get docutils>=0.7.

Hmm: then why the syntax "(docutils 0.6 (/usr/lib/pymodules/python2.6)"?
But the implication that that version of docutils is somehow bound to
that version of python is obviously wrong, since (I'll post
separately--it gets long) I was able to upgrade the docutils.

>>> 1 What's the easiest or best way to globally install a more-uplevel
>>>   python on a given release of ubuntu, without hosing the global/
>>>   official/default/downlevel python, much less my debian/ubuntu/
>>>   aptitude packages and their managers?

> The Ubuntu repository usually has multiple versions of Python
> [available] to install through their packaging system.

That's good to know. Unfortunately web-searching for package name like 'python' gets

> Found 100 matching packages.
> Your keyword was too generic, for optimizing reasons some results might have been suppressed.
> Please consider using a longer keyword or more keywords.

> Another way is to compile your own Python to someplace not in your $PATH
> using the --prefix option to the configure step.

Josh Johnson Wed, 03 Aug 2011 16:01:02 -0400
>> I haven't had trouble getting multiple pythons to install in Ubuntu.
>> They play pretty well together. The hard part was finding the right
>> apt repository with the right versions in it.

What was the right apt repository and the right versions?

>> You can try compiling python from source (installing the build-dep
>> for whatever version(s) of python are available for your distro might
>> help smooth out the process)

> I like just compiling my own Python. It's what professionals do and it
> gives you a great amount of control over your Python versions and what
> you are doing with them.

Sure, but I suspect that, at my current level of expertise, I need to be protected from that level of control :-)

>>> 2 Instead of doing global installs, I'd like to do (though I haven't
>>>   needed to, yet) isolated installs. But my impression is that
>>>   (e.g.) visualenv won't help with python-version problems, only
>>>   python-package-version problems. Am I missing something? If not,
>>>   should I use pythonbrew? or similar?

> Correct. virtualenv is for managing the python packages of a
> particular python installation. [...] pythonbrew is for managing
> python version installs to your $HOME.


>>> 3 Periodically trizpug has threads on "getting started with python,"
>>>   but they tend to be like "learning programming with python." I'd
>>>   appreciate pointers to doc more about the "python ecosystem"
>>>   (particularly, ... wait for it ... python-version and
>>>   python-package-version management :-) targeting folks who've grown
>>>   up programming elsewhere. FWIW I've scanned through

>>> http://trizpug.org/up-to-speed/

>>>  and am not seeing anything like that,

> http://www.packtpub.com/expert-python-programming/book

> This covers virtualenv, which is great for python package management,
> and buildout, which is great for building Pythons (using Python). It's
> by the Python package management guru.

"gotta get me one of those"

> Python version management is done wholly through your $PATH
> environment variable. However, the awesome Doug Hellmann puts out this
> package which manages multiple virtualenvs, which I think is maybe
> what you want:

> http://pypi.python.org/pypi/virtualenvwrapper

> It's a bit meta-meta for me,

I've seen that, though I didn't mention it because it didn't seem
relevant to this problem: it's basically just a façade for visualenv,
no? That being said, I definitely intend to use virtualenvwrapper just
for the ease of use.

> I just make multiple virtualenvs and activate the one I want to work
> with at any given time. And I compile multiple Pythons, usually in
> /opt,

That I understand, but ...

> to make those virtualenvs with whatever Python version I need.

... this I don't. How do you bind a given virtualenv to a given python version?
(Or python-like thing: I've got a project I want to bind to pypy, since that way it runs in time/6.)

> You're the second person today I've talked to about managing multiple
> Python versions.

That either means I'm not a Darwin Award candidate, or that there's 2 of us :-)

Your assistance is appreciated, Tom Roche <Tom_Roche at pobox.com>

More information about the TriZPUG mailing list