Error installing current version on Win32/Python 2.5.2

1 view
Skip to first unread message

Ben Sizer

unread,
May 9, 2008, 3:44:23 PM5/9/08
to TurboGears
I downloaded tgsetup.py, ran it, and this is my output:


TurboGears Installer
Beginning setuptools/EasyInstall installation and TurboGears download

Searching for TurboGears==1.0.4.4
Reading http://www.turbogears.org/download/
Reading http://pypi.python.org/simple/TurboGears/
Reading http://www.turbogears.org
Reading http://www.turbogears.org/download/filelist.html
Best match: TurboGears 1.0.4.4
Downloading http://files.turbogears.org/eggs/TurboGears-1.0.4.4-py2.5.egg
Processing TurboGears-1.0.4.4-py2.5.egg
removing 'e:\code\python25\lib\site-packages\TurboGears-1.0.4.4-
py2.5.egg' (and
everything under it)
creating e:\code\python25\lib\site-packages\TurboGears-1.0.4.4-
py2.5.egg
Extracting TurboGears-1.0.4.4-py2.5.egg to e:\code\python25\lib\site-
packages
TurboGears 1.0.4.4 is already the active version in easy-install.pth
Installing tg-admin-script.py script to e:\code\Python25\Scripts
Installing tg-admin.exe script to e:\code\Python25\Scripts

Installed e:\code\python25\lib\site-packages\turbogears-1.0.4.4-
py2.5.egg
Reading http://files.turbogears.org/eggs/
Processing dependencies for TurboGears==1.0.4.4
Searching for simplejson>=1.3
Reading http://pypi.python.org/simple/simplejson/
Reading http://undefined.org/python/#simplejson
Best match: simplejson 1.9.1
Downloading http://pypi.python.org/packages/source/s/simplejson/simplejson-1.9.1
.tar.gz#md5=d2ee608bdf6397b82a7cd53c8602b29e
Processing simplejson-1.9.1.tar.gz
Running simplejson-1.9.1\setup.py -q bdist_egg --dist-dir c:
\docume~1\user\local
s~1\temp\easy_install-ukadjy\simplejson-1.9.1\egg-dist-tmp-8thuom
**********************************************************************
WARNING: The C extension could not be compiled, speedups are not
enabled.

Below is the output showing how the compilation failed:

Python was built with Visual Studio 2003;
extensions must be built with a compiler than can generate compatible
binaries.
Visual Studio 2003 was not found on this system. If you have Cygwin
installed,
you can try compiling with MingW32, by passing "-c mingw32" to
setup.py.
**********************************************************************
error: Setup script exited with error: can't copy 'simplejson.egg-info
\native_libs.txt': doesn't exist or not a regular file



The "TurboGears 1.0.4.4 is already the active version in easy-
install.pth" line is probably there because the first time I ran this
install script, I double clicked on the icon and so the error message
was never visible. The above comes from re-running the script.

Hope someone has some ideas.

--
Ben Sizer

Barry Hart

unread,
May 9, 2008, 5:05:09 PM5/9/08
to turbo...@googlegroups.com
I started noticing this yesterday. I think this means simplejson is using a C extension now, and it wants to build that code on your machine. So you'll need to install GCC.

This leads to more questions, which I can't answer for sure because I haven't updated my own machine yet.
- Are there instructions for doing this anywhere? I know you can get GCC from the cygwin site.
- Once GCC is installed, is there anything else someone needs to do so Python can find it?

Barry


Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.

Agustin Villena

unread,
May 9, 2008, 7:03:59 PM5/9/08
to turbo...@googlegroups.com
Better is to link the windows binary egg of simplejson
Available in
http://files.turbogears.org/eggs/simplejson-1.8.1-py2.5-win32.egg

easy_install http://files.turbogears.org/eggs/simplejson-1.8.1-py2.5-win32.egg

and then run tgsetup.py

Cheers
  Agustin

2008/5/9 Barry Hart <barry...@yahoo.com>:

Ben Sizer

unread,
May 10, 2008, 7:03:43 AM5/10/08
to TurboGears
On May 10, 12:03 am, "Agustin Villena" <agustin.vill...@gmail.com>
wrote:
> Better is to link the windows binary egg of simplejson
> Available inhttp://files.turbogears.org/eggs/simplejson-1.8.1-py2.5-win32.egg
>
> easy_installhttp://files.turbogears.org/eggs/simplejson-1.8.1-py2.5-win32.egg
>
> and then run tgsetup.py

Thanks, that appears to have done the trick.

Is it possible for someone to fix tgsetup.py so this is done
automatically?

--
Ben Sizer

Agustin Villena

unread,
May 10, 2008, 9:17:35 AM5/10/08
to turbo...@googlegroups.com
As far as I know, it's a pylons installation problem...

2008/5/10 Ben Sizer <kyl...@gmail.com>:

Christopher Arndt

unread,
May 10, 2008, 10:14:44 AM5/10/08
to turbo...@googlegroups.com
Agustin Villena schrieb:

> As far as I know, it's a pylons installation problem...

No, it's not. See explanation below.

> 2008/5/10 Ben Sizer <kyl...@gmail.com>:
>> On May 10, 12:03 am, "Agustin Villena" <agustin.vill...@gmail.com>
>> wrote:
>>> Better is to link the windows binary egg of simplejson
>>> Available inhttp://files.turbogears.org/eggs/simplejson-1.8.1-py2.5-win32.egg
>>>
>>> easy_installhttp://files.turbogears.org/eggs/simplejson-1.8.1-py2.5-win32.egg
>>>
>>> and then run tgsetup.py
>> Thanks, that appears to have done the trick.
>>
>> Is it possible for someone to fix tgsetup.py so this is done
>> automatically?

No and yes. This is not a problem of tgsetup.py per se, but a problem
with the way easy_install (which is used by tgsetup.py) works:

- TurboGears (or rather TurboJson) has specified "simplejson" as a
requirement.
- There is a new version of simplejson (1.9.1, previous was 1.8.1)
- Even though tgsetup.py uses the -f option to easy_install to tell it
to look for distribution files on http://files.turbogears.org/eggs,
when easy_install searches a package to install, it looks up the
package on PyPI, to determine the newest version.
- As long as the newest version on files.turbogears.org
(simplejson-1.8.1) matches the latest version on PyPI everything is
fine and easy_install downloads & installs the package from
files.turbogears.org.
- But if there is a newer version on PyPI, easy_install ignores the
package on file.turbogears.org. Even if files.turbogears.org has a
binary egg for a package and there is no binary egg for the newer
version on PyPI, easy_install will download the source package for the
newer version from PyPI and try to download, compile and install this.
- At this point, when you don't have a compiler (which is often the case
on Windows), the installation fails.
- As an additional complication, you can not compile simplejson with
Visual Studio, you must compile it with MingW. :-(

Solutions:

a) We need to upload binary eggs for simplejson-1.9.1 for Win, Linux and
OS X to files.turbogears.org. The problem is that things will break
again when the next simplejson release comes out. Still, we will try
to upload new binary eggs asap.
b) We need to host our own PyPI server and adapt tgsetup.py to use this.
We're working on this.

Workarounds:

a) You install and ol version of simplejson from files.turbogears.org
before you run tgsetup.py
b) You install a compiler MingW.


I hope that clears up the matter a bit.

Chris

Reply all
Reply to author
Forward
0 new messages