Tutorials

28 views
Skip to first unread message

drebbin

unread,
Mar 3, 2011, 3:43:56 AM3/3/11
to pylons...@googlegroups.com
Hi all,

I am new to Pyramid and in the last days I was studying the handbook. When I tried out the tutorials, an issue came up. Tutorial "wiki1" tells after installing Pyramid itself to install more components [1], of which repoze.tm is one. Unfortunately, starting the app throws an exception that says "Module repoze.tm has no 'default_commit_veto' attribute".
After extensive research (I am new to all of this stuff, so I had to read about virtualenv and its wrapper, setuptools vs. distribute, easy_install vs. pip, and of course repoze.tm) I found that easy_installs pulls repoze.tm 1.0a5 and not the latest 1.0b1, where this method is defined. Luckily, I earlier tried tutorial "wiki2" and remembered that there repoze.tm2 is mentioned. Using this also in "wiki1" solved the problem. (And hopefully does not introduce others which I am not aware of...)

Side note: as somebody in some mailing list mentioned, distribute and pip is the new hotness. I used them successfully in the tutorials, maybe you can update the narrative.
Also, following the tutorials by the word, I had to call virtualenv with the switch "--setuptools", otherwise it would default to 'distribute'.

KR, drebbin

Mike Orr

unread,
Mar 3, 2011, 5:36:17 PM3/3/11
to pylons...@googlegroups.com
On Thu, Mar 3, 2011 at 12:43 AM, drebbin <dirk...@gmx.net> wrote:
> Side note: as somebody in some mailing list mentioned, distribute and pip is
> the new hotness. I used them successfully in the tutorials, maybe you can
> update the narrative.

That's still evolving. Distutils2 is the new future hotness but it's
still in alpha. It's written with dependencies and pip in mind, and
will be in Python 3 someday (with a package available for Python 2).
In the meantime, I use Ubuntu 10.10 and install the
"python-setuptools" package, which is actually Distribute. That works
fine for me, along with the 10.10 versions of python-pip,
python-virtualenv, and virtualenvwrapper.

I do think that setuptools and easy_install need to be eradicated from
the docs. (The only advantage easy_install has is for installing
precompiled Windows binary eggs, for packages that contain C
extensions.) But Distribute is also stagnating somewhat as development
focuses on Distutils2.

--
Mike Orr <slugg...@gmail.com>

Chris McDonough

unread,
Mar 3, 2011, 5:40:46 PM3/3/11
to pylons...@googlegroups.com

A countervailing opinion: pip has problems with namespace packages. For
an example, trying to use tox (a testing package which uses pip
internally) to run tests against a namespace package (like
repoze.anything) consistently fails. I haven't had time (or
inclination) to dig into this purely because easy_install *does* work
fine for these kinds of packages, but the failure tox may be compelling
enough for me to dig into why pip fails under some circumstances related
to namespace packages.

Also, at this point I don't see much point in proactively switching
everything to use Distribute. Its latest release is actually older than
setuptools' AFAIK and we don't actually require any of the extra
Distribute features yet (such as automated 2to3 running).

- C

Mark Ramm

unread,
Mar 3, 2011, 5:45:35 PM3/3/11
to pylons...@googlegroups.com, Chris McDonough
> A countervailing opinion: pip has problems with namespace packages.  For
> an example, trying to use tox (a testing package which uses pip
> internally) to run tests against a namespace package (like
> repoze.anything) consistently fails.  I haven't had time (or
> inclination) to dig into this purely because easy_install *does* work
> fine for these kinds of packages, but the failure tox may be compelling
> enough for me to dig into why pip fails under some circumstances related
> to namespace packages.

I think the reason PIP has trouble with namespace packages is the
choice to always use single-version-externally-managed.

In my experience, if you install EVERYTHING with pip, you're ok, or if
you install everything without it, you are OK, but using it along side
distribute and easy install.

--Mark

Chris McDonough

unread,
Mar 3, 2011, 5:46:44 PM3/3/11
to Mark Ramm, pylons...@googlegroups.com

Seems unlikely that this is the same problem, because tox does indeed
use pip exclusively internally into a virtualenv it creates itself, so
there is no mixing going on.

- C


Reply all
Reply to author
Forward
0 new messages