simplejson installation failure

2 views
Skip to first unread message

antonio

unread,
Nov 6, 2008, 4:20:40 AM11/6/08
to pylons-discuss
Can´t get simplejson installed with easy install.
I don´t know how to install manually without easy install, don´t know
the necessary commands.

Other pylons-components that I had to install with easy install worked
well. I had to install some components separately because installation
of pylons paket wouldn´t work, it stopped at the failure with
simplejson.

Any help appreciated, thanks.

Protocol:

C:\Python26\Scripts>easy_install-2.6.exe simplejson
Searching for simplejson
Reading http://pypi.python.org/simple/simplejson/
Reading http://undefined.org/python/#simplejson
Best match: simplejson 2.0.4
Downloading http://pypi.python.org/packages/source/s/simplejson/simplejson-2.0.4
.tar.gz#md5=9a888ea017ef2fcd42a2823454950b16
Processing simplejson-2.0.4.tar.gz
Running simplejson-2.0.4\setup.py -q bdist_egg --dist-dir c:
\dokume~1\johndoe\lo
kale~1\temp\easy_install-8nk8s5\simplejson-2.0.4\egg-dist-tmp-wy68t0
error: Setup script exited with error: None

C:\Python26\Scripts>

antonio

unread,
Nov 6, 2008, 5:10:14 AM11/6/08
to pylons-discuss
Received the following in an email from James Gardner, guess this will
solve my problems, the other one was " virtual Python environment
install failure"; may be helpful to other newbies here:

"Pylons doesn't support Python 2.6 yet but the developers are working
hard on it so that it will when the book is published. Try Python
2.5.2 and it should all work perfectly. I tested it on Vista last week
with Pylons 0.9.7rc2.

Pylons 0.9.7 isn't officially released yet so if you are new to Pylons
you might want to wait until it is."



On 6 Nov., 10:20, antonio <a.sil...@gmx.net> wrote:
> Can´t get simplejson installed with easy install.
> I don´t know how to install manually without easy install, don´t know
> the necessary commands.
>
> Other pylons-components that I had to install with easy install worked
> well. I had to install some components separately because installation
> of pylons paket wouldn´t work, it stopped at the failure with
> simplejson.
>
> Any help appreciated, thanks.
>
> Protocol:
>
> C:\Python26\Scripts>easy_install-2.6.exe simplejson
> Searching for simplejson
> Readinghttp://pypi.python.org/simple/simplejson/
> Readinghttp://undefined.org/python/#simplejson
> Best match: simplejson 2.0.4
> Downloadinghttp://pypi.python.org/packages/source/s/simplejson/simplejson-2.0.4

Mike Orr

unread,
Nov 6, 2008, 9:30:43 AM11/6/08
to pylons-...@googlegroups.com
Simplejson has a C component that doesn't install cleanly on some
Windows systems. There are some prebuilt eggs for Windows floating
around that don't have this problem. I don't know exactly where they
are but you can look at http://pylonshq.com/download/0.9.7,
http://pylonshq.com/download, and http://turbogears.org/ (I've been
told they maintain an egg for this.)

There's a line you have to delete in a configuration file to get it to
install, but I've forgotten what it is.

I disagree with James about using 0.9.6 as you would then have to
upgrade your application pretty soon, but the main problem with 0.9.7
is its unfinished documentation and tutorials, which can obviously be
frustrating if you're new to Pylons.

I think Ben told me Pylons works with Python 2.6 now.

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

Philip Jenvey

unread,
Nov 6, 2008, 1:22:47 PM11/6/08
to pylons-...@googlegroups.com

First, ensure you're using the latest setuptools -- 0.6c9.

If the problem still occurs, try running easy_insatll with the -v
(verbose) option. Otherwise we can't tell what actually happened here.

--
Philip Jenvey


Florent Aide

unread,
Nov 7, 2008, 5:52:06 PM11/7/08
to pylons-...@googlegroups.com
On Thu, Nov 6, 2008 at 3:30 PM, Mike Orr <slugg...@gmail.com> wrote:
>
> Simplejson has a C component that doesn't install cleanly on some
> Windows systems. There are some prebuilt eggs for Windows floating
> around that don't have this problem. I don't know exactly where they
> are but you can look at http://pylonshq.com/download/0.9.7,
> http://pylonshq.com/download, and http://turbogears.org/ (I've been
> told they maintain an egg for this.)

http://files.turbogears.org/eggs/

I compile and upload binary eggs for simplejson on as much platform as
I can and I regularly do so for Windows (py24 & py25), Linux (py25)
and Macos 10.5 (py25)

Florent.

Deron Meranda

unread,
Nov 7, 2008, 7:20:48 PM11/7/08
to pylons-...@googlegroups.com
On Fri, Nov 7, 2008 at 5:52 PM, Florent Aide <floren...@gmail.com> wrote:
> On Thu, Nov 6, 2008 at 3:30 PM, Mike Orr <slugg...@gmail.com> wrote:
>> Simplejson has a C component that doesn't install cleanly on some
>> Windows systems.

If you're in a pinch and can't get simplejson to work, there are some
other JSON modules that are pure python. The calling interfaces may
be just slightly different, but not much. It should be very easy to make
a simple wrapper for any of them that completely replicated the
simplejson interface if you need it.

See http://deron.meranda.us/python/comparing_json_modules/
and my own module at
http://deron.meranda.us/python/demjson/

My module actually can be trimmed to just a single *.py
file which can be very easily installed if needed, or just dropped
into your own project.

Note that Python 3.0 has officially included simplejson (although
being renamed). But most of the various modules by all the
authors do a pretty decent job of JSON handling now.
--
Deron Meranda

Mike Orr

unread,
Nov 8, 2008, 1:34:40 AM11/8/08
to pylons-...@googlegroups.com
On Fri, Nov 7, 2008 at 4:20 PM, Deron Meranda <deron....@gmail.com> wrote:
>
> On Fri, Nov 7, 2008 at 5:52 PM, Florent Aide <floren...@gmail.com> wrote:
>> On Thu, Nov 6, 2008 at 3:30 PM, Mike Orr <slugg...@gmail.com> wrote:
>>> Simplejson has a C component that doesn't install cleanly on some
>>> Windows systems.
>
> If you're in a pinch and can't get simplejson to work, there are some
> other JSON modules that are pure python.

People aren't installing simplejson because they're using it; they're
installing it because it's a Pylons dependency. So you either have to
download Pylons manually and hack setup.py, or find some way to get
simplejson installed. It's only used for the @jsonify decorator.
I've argued for dropping the dependency or downgrading it to the older
simplejson that doesn't have this install problem, but was overruled
by "hopefully simplejson will fix their package soon".

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

Philip Jenvey

unread,
Nov 8, 2008, 2:32:17 AM11/8/08
to pylons-...@googlegroups.com


AFAICT this is a new problem (at least I don't recognize it). Just to
clarify I did submit fixes for all the issues we encountered (to both
setuptools and simplejson), we were just waiting for the
setuptools-0.6c9 release, which was overdue anyway. That's been out
for over a month now.

Maybe we should reconsider dropping it -- I don't like a lot of
dependencies either -- but first I'd like to know what the actual
problem is here.

--
Philip Jenvey

Bob Ippolito

unread,
Nov 8, 2008, 6:14:35 AM11/8/08
to pylons-...@googlegroups.com

I'm not sure what the problem is, but if someone gives me a patch that
makes simplejson easy_install from Windows then I'll apply it. I
don't/won't use Windows or care about Windows at work so it's not a
priority of mine. The current implementation of setup.py that tries to
allow Windows users to build without a compiler was contributed and
applied because it doesn't negatively affect the platforms I care
about. If someone contributes a better patch I'll gladly apply it. In
the same vein I'll accept people to manage Windows binary releases if
that's what's necessary.

simplejson works just fine with or without the C extension and works
everywhere I've needed it (Mac OS X, FreeBSD, Linux). Every bug that's
ever been filed has been fixed. It's actually quite fast (at least in
recent incarnations) without the C extension because it was optimized
as far as I could get it without C, and then I beefed up the extension
to get those extra cycles wherever possible because we use it so
extensively at Mochi Media (probably gigabytes a day if not more). For
our data simplejson 2.x is faster than cPickle, so it's our
serialization de jour for internal and external stuff.

If you come up with a fix, the right place to contribute it is
http://code.google.com/p/simplejson/issues/list -- don't be daunted by
the lack of other open issues; it's only empty because there are no
known bugs (other than perhaps Windows packaging related issues, which
get closed as WontFix without a working patch).

-bob

Florent Aide

unread,
Nov 8, 2008, 6:18:14 AM11/8/08
to pylons-...@googlegroups.com
On Sat, Nov 8, 2008 at 12:14 PM, Bob Ippolito <b...@redivi.com> wrote:
>
> I'm not sure what the problem is, but if someone gives me a patch that
> makes simplejson easy_install from Windows then I'll apply it. I
> don't/won't use Windows or care about Windows at work so it's not a
> priority of mine. The current implementation of setup.py that tries to
> allow Windows users to build without a compiler was contributed and
> applied because it doesn't negatively affect the platforms I care
> about. If someone contributes a better patch I'll gladly apply it. In
> the same vein I'll accept people to manage Windows binary releases if
> that's what's necessary.

I could handle binary builds and help for the upload to pypi if you're
interested.

Florent.

Bob Ippolito

unread,
Nov 8, 2008, 6:41:02 AM11/8/08
to pylons-...@googlegroups.com

Absolutely, just let me know what your PyPI username is and I'll grant
you maintainer access to provide Windows builds. I don't hear any
complaints from anyone else (and even Windows users don't generally
voice them directly). The responsibilities for a binary maintainer
are:

1. Follow PyPI and/or http://bob.pythonmac.org/ to watch for releases
(I don't blog much and release even less frequently)
2. Provide Windows builds for the versions of Python that Windows
users care about (I'm guessing 2.4, 2.5, 2.6). simplejson was
compatible at 2.3 a long time ago, but that compatibility has not been
maintained (it may still work, but I haven't heard anything one way or
the other). I'm not sure what the 64-bit story is for Windows users
is, so that might potentially add a couple extra build configurations.

If you can't provide all build configurations for Windows that's fine
too, some is certainly better than none!

-bob

Florent Aide

unread,
Nov 8, 2008, 1:33:50 PM11/8/08
to pylons-...@googlegroups.com
On Sat, Nov 8, 2008 at 12:41 PM, Bob Ippolito <b...@redivi.com> wrote:
>
>> I could handle binary builds and help for the upload to pypi if you're
>> interested.
>
> Absolutely, just let me know what your PyPI username is and I'll grant
> you maintainer access to provide Windows builds. I don't hear any
> complaints from anyone else (and even Windows users don't generally
> voice them directly). The responsibilities for a binary maintainer
> are:

florentaide

I can handle win (py24 & py25) linux (py25) macos 10.5 (py25)

Florent.

Bob Ippolito

unread,
Nov 8, 2008, 2:09:42 PM11/8/08
to pylons-...@googlegroups.com

Done.

-bob

Reply all
Reply to author
Forward
0 new messages