Installing Pylons with virtualenv

437 views
Skip to first unread message

Chris B

unread,
Jan 29, 2009, 9:29:26 PM1/29/09
to pylons-discuss
Hello
I am trying to install Pylons in my home directory on a Unix server.

I am new to both Python and Unix and, unfortunately have fallen at the
first hurdle :-(

When I run the the "go-pylons.py" script, I get the following
traceback:

>python go-pylons.py pylons_sandbox/
Traceback (most recent call last):
File "go-pylons.py", line 950, in ?
SITE_PY = """
LookupError: unknown encoding: zlib

This corresponds to the following section of the script:
##file site.py
SITE_PY = """
blah...blah...blah...
""".decode("base64").decode("zlib")

Here are some environment details:
OS = HP-UX B.11.11 U 9000/800
Python version = 2.4.1
There is an implementation of zlib version 1.1.3 installed at opt/zlib

If anyone has any ideas that would be much appreciated.

Thanks

Chris



Mark Hildreth

unread,
Jan 29, 2009, 9:59:15 PM1/29/09
to pylons-...@googlegroups.com
On Thu, Jan 29, 2009 at 9:29 PM, Chris B <bridg...@gmail.com> wrote:
>
> When I run the the "go-pylons.py" script, I get the following
> traceback:
>
>>python go-pylons.py pylons_sandbox/
> Traceback (most recent call last):
> File "go-pylons.py", line 950, in ?
> SITE_PY = """
> LookupError: unknown encoding: zlib
>

The python library installed on your system (or at least the one you
targeted with virtualenv -p ???) is missing the module to allow for
zlib encoding. I found this module in my python directory
(/usr/local/lib/python2.6/encodings/zlib_codec.py). Check that this
file exists in the library you're using to make the virtual
environment from.

If you tried to compile python from source, then you probably just
need to make sure that you have the zlib development headers and
compile it again, otherwise that module will not be installed into the
python standard library.

Wyatt Baldwin

unread,
Jan 29, 2009, 10:41:23 PM1/29/09
to pylons-discuss
Which flavor/version of UNIX?

Chris B

unread,
Feb 2, 2009, 12:13:20 AM2/2/09
to pylons-discuss
Hi Mark and Wyatt

Thanks for your interest.
In the end I installed on a different machine (Linux) and everything
was fine.

Mark zlib_codec.py was where you said it would be - got a bit lost
when you mentioned 'development headers'. Would I have needed root
access to re-compile - or could I have created my own personal
compilation in my home directory, say?

Wyatt the original box I was using was running HP-UX B.11.11.

Cheers,

Chris

Mark Hildreth

unread,
Feb 2, 2009, 10:08:48 AM2/2/09
to pylons-...@googlegroups.com
On Mon, Feb 2, 2009 at 12:13 AM, Chris B <bridg...@gmail.com> wrote:
>
> Mark zlib_codec.py was where you said it would be - got a bit lost
> when you mentioned 'development headers'. Would I have needed root
> access to re-compile - or could I have created my own personal
> compilation in my home directory, say?
>

Never tried it, so I couldn't say. All I know is that in my situation
(running on my own Debian system w/ root access) you would get that
error if you tried compiling without the zlib development package
(this would be different than just having a zlib binary on the system
itself). I would imagine, though, that you could've created your own
personal compilation, so long as you made sure that you correctly set
up the paths correctly, but once again I've never tried it so I can't
be sure.

Wyatt Baldwin

unread,
Feb 2, 2009, 2:14:12 PM2/2/09
to pylons-discuss
On Feb 1, 9:13 pm, Chris B <bridgeyi...@gmail.com> wrote:
> Hi Mark and Wyatt
>
> Thanks for your interest.
> In the end I installed on a different machine (Linux) and everything
> was fine.
>
> Mark zlib_codec.py was where you said it would be - got a bit lost
> when you mentioned 'development headers'.  Would I have needed root
> access to re-compile - or could I have created my own personal
> compilation in my home directory, say?

You would have needed root access to install[1] system-wide (e.g., in /
usr/local), but you could have also installed to $HOME. On Linux you'd
probably need to set LD_LIBRARY_PATH if you install to $HOME.
Personally, though, I'd almost always go with the package-management
version of a library like that. I'm curious what kind of package
management is available on HP-UX.

[1] Just to pedantic, you don't need to be root to _compile_, only to
install to a protected location.
Reply all
Reply to author
Forward
0 new messages