Re: [Repoze-dev] Error importing repoze.who.config

2012-04-17 Thread Paul Winkler
On Tue, Apr 17, 2012 at 05:25:19PM -0400, Chris McDonough wrote:
> On Tue, 2012-04-17 at 22:18 +0100, Anusha Ranganathan wrote:
> > Hello, 
> > I have been trying to get repoze.what / repoze.who working with a
> > pylons 1.0 application.
> > 
> > When I try to initialize my pylons application, I get the following
> > error 
> > 
> > from repoze.who.config import make_middleware_with_config as
> > make_who_with_config
> > ImportError: No module named config
> > 
> > I have repoze.what/repoze.who configured and working on another
> > machine but have problems getting it to work on a new installation.
> 
> 
> I suspect you've got some "repoze" packages installed with pip and some
> installed with easy_install.  They don't mix well.  I'd suggest maybe
> starting in a new virtualenv and installing everything using
> easy_install.

For those who haven't been bitten by this:

The issue I've seen multiple times is that easy_install supports
installing multiple versions of the same package, and pip does not.
If you use both pip and easy_install and end up with multiple
installed versions, I couldn't tell you what determines which version
of the package actually gets used; it's certainly non-obvious, and
experience suggests that murphy's law applies: it's always the one
that doesn't work.

Chris's advice is good. Start with a clean environment, pick either
pip or easy_install and use it exclusively, at least within that
environment.

-- 

Paul Winkler
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


Re: [Repoze-dev] Error importing repoze.who.config

2012-04-17 Thread Chris McDonough
On Tue, 2012-04-17 at 22:31 +0100, Anusha Ranganathan wrote:
> Hello Chris,
> Thanks for your reply.
> I haven't used pip though I did use apt-get to install some of the
> python packages like sqlalchemy.
> I'll try installing the packages again in a virtual env and install
> all of them using easy_install.


Make sure to use the --no-site-packages flag when you create the new
virtualenv.  It's the default in newer versions of virtualenv, but you
may have an older one.
> 
> Let's see how that goes.
> 
> Regards.
> Anusha
> 
> On Tue, Apr 17, 2012 at 10:25 PM, Chris McDonough 
> wrote:
> On Tue, 2012-04-17 at 22:18 +0100, Anusha Ranganathan wrote:
> > Hello,
> > I have been trying to get repoze.what / repoze.who working
> with a
> > pylons 1.0 application.
> >
> > When I try to initialize my pylons application, I get the
> following
> > error
> >
> > from repoze.who.config import
> make_middleware_with_config as
> > make_who_with_config
> > ImportError: No module named config
> >
> > I have repoze.what/repoze.who configured and working on
> another
> > machine but have problems getting it to work on a new
> installation.
> 
> 
> 
> I suspect you've got some "repoze" packages installed with pip
> and some
> installed with easy_install.  They don't mix well.  I'd
> suggest maybe
> starting in a new virtualenv and installing everything using
> easy_install.
> >
> > I have tried installing just repoze.who again, but that
> makes no
> > difference.
> >
> > A few links that may be of use:
> > who.ini file used by repoze.who:
> >
> https://github.com/dataflow/RDFDatabank/blob/master/who.ini
> > middleware.py which throws the exception:
> >
> >
> 
> https://github.com/dataflow/RDFDatabank/blob/master/rdfdatabank/config/middleware.pyMy
>  database model
> > Sqlalchemy model
> >
> >
> https://github.com/dataflow/RDFDatabank/tree/master/rdfdatabank/model
> >
> > Packages installed using easy_install (on Ubuntu Oneiric
> with python
> > 2.7)
> > pylons 1.0
> > repooze.what-pylons
> > repoze.what-quickstart
> >
> > If you would like to have a look at what I am trying to
> achieve with
> > repoze, a demo of my app currently working with repoze.what
> and
> > sqlalchemy is available at http://databank-vm1.oerc.ox.ac.uk
> >
> > Any thoughts and suggestions would be greatly appreciated as
> I am
> > stumped.
> >
> > Regards,
> > Anusha
> >
> 
> > ___
> > Repoze-dev mailing list
> > Repoze-dev@lists.repoze.org
> > http://lists.repoze.org/listinfo/repoze-dev
> 
> 
> 


___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


Re: [Repoze-dev] Error importing repoze.who.config

2012-04-17 Thread Chris McDonough
On Tue, 2012-04-17 at 22:18 +0100, Anusha Ranganathan wrote:
> Hello, 
> I have been trying to get repoze.what / repoze.who working with a
> pylons 1.0 application.
> 
> When I try to initialize my pylons application, I get the following
> error 
> 
> from repoze.who.config import make_middleware_with_config as
> make_who_with_config
> ImportError: No module named config
> 
> I have repoze.what/repoze.who configured and working on another
> machine but have problems getting it to work on a new installation.


I suspect you've got some "repoze" packages installed with pip and some
installed with easy_install.  They don't mix well.  I'd suggest maybe
starting in a new virtualenv and installing everything using
easy_install.
> 
> I have tried installing just repoze.who again, but that makes no
> difference.
> 
> A few links that may be of use:
> who.ini file used by repoze.who: 
> https://github.com/dataflow/RDFDatabank/blob/master/who.ini
> middleware.py which throws the exception: 
> 
> https://github.com/dataflow/RDFDatabank/blob/master/rdfdatabank/config/middleware.pyMy
>  database model
> Sqlalchemy model
> 
> https://github.com/dataflow/RDFDatabank/tree/master/rdfdatabank/model
> 
> Packages installed using easy_install (on Ubuntu Oneiric with python
> 2.7)
> pylons 1.0
> repooze.what-pylons
> repoze.what-quickstart
> 
> If you would like to have a look at what I am trying to achieve with
> repoze, a demo of my app currently working with repoze.what and
> sqlalchemy is available at http://databank-vm1.oerc.ox.ac.uk 
> 
> Any thoughts and suggestions would be greatly appreciated as I am
> stumped.
> 
> Regards,
> Anusha
> 
> ___
> Repoze-dev mailing list
> Repoze-dev@lists.repoze.org
> http://lists.repoze.org/listinfo/repoze-dev


___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev