pyramid start example (4.1) does not run on my machine

385 views
Skip to first unread message

armen

unread,
Mar 9, 2011, 3:16:03 AM3/9/11
to pylons-devel
Dear community,

I am new to pyramid, I followed the installation steps as described
in pyramid 1.0 documentation, but when I try to run the example of
paragraph 4.1 I get the following error:

from pyramid.config import Configurator
ImportError: No module named config

I think pyramid is properly installed in my system as when I type
"from pyramid.config import Configurator" from within the python shell
it works. Additionally, help("modules") command returns a list in
which pyramid is included.
Thank you in advance for your help

Sebastian Zwack

unread,
Mar 9, 2011, 6:23:48 PM3/9/11
to pylons-devel
Are you sure you're using the same python when trying to start pyramid
and in the shell (path environment)?
I once had similiar confusions when testing with different python
versions and virtualenv.

Sebastian

armen

unread,
Mar 10, 2011, 6:55:04 AM3/10/11
to pylons-devel
hi everybody,
This is what I did.
1)I installed a virtualenv catalogue named env
2)I activated the virtualenv, a prefix (env) appeared in my prompt
3)finally I typed easy_install pyramid

Unfortunately the above error appears, local python shell has pyramid
installed.

What drives me crazy is that on my MAC OS desktop computer I managed
to install it using mac ports, however in my both linux machines
(OpenSuse and Arch) it did not.
The weird thing is that "from paster.httpserver import serve" import
works.
I also tested pylons on my linux box (OpenSuse) and it works too.
Armen

On Mar 10, 1:23 am, Sebastian Zwack <sebastian.zw...@googlemail.com>
wrote:

Chris McDonough

unread,
Mar 10, 2011, 7:40:42 AM3/10/11
to pylons...@googlegroups.com
My only guess is that you're not using the virtualenv "paster" or
"python" when you're trying to start the application.

Sebastian Zwack

unread,
Mar 10, 2011, 7:46:16 AM3/10/11
to pylons-devel
Also note that if you didn't use --no-site-packages with virtualenv
the global packages are used.
Which should work if you installed it there as you said though.

Simon King

unread,
Mar 10, 2011, 2:51:38 PM3/10/11
to pylons...@googlegroups.com

Do you perhaps have another python package called 'pyramid' somewhere on your path (such as a test app)? Try putting the following before the line that is generating the error:

import pyramid
print pyramid.__path__

Simon

> --
> You received this message because you are subscribed to the Google Groups "pylons-devel" group.
> To post to this group, send email to pylons...@googlegroups.com.
> To unsubscribe from this group, send email to pylons-devel...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/pylons-devel?hl=en.
>

Chris McDonough

unread,
Mar 10, 2011, 3:00:15 PM3/10/11
to pylons...@googlegroups.com
Another possibility is that (somehow) you are using a very old version
of Pyramid that does not have a config module. This should not be the
case, though, if you've installed Pyramid within the last two months or
so though.

- C

Simon King

unread,
Mar 10, 2011, 3:12:34 PM3/10/11
to pylons-devel
Sorry, that should have been __file__ instead of __path__

On Mar 10, 7:51 pm, Simon King <si...@simonking.org.uk> wrote:
> Do you perhaps have another python package called 'pyramid' somewhere on your path (such as a test app)? Try putting the following before the line that is generating the error:
>
> import pyramid
> print pyramid.__path__
>
> Simon
>

armen

unread,
Mar 10, 2011, 3:38:08 PM3/10/11
to pylons-devel
many thanks everybody for your help
Simon's advice sorted out my problem which was really simple.
I had a test python file named pyramid.py so there was a namespace
conflict I guess
Armen
Reply all
Reply to author
Forward
0 new messages