jayvdb / jsonlib2

Automatically exported from code.google.com/p/jsonlib2
MIT License
0 stars 0 forks source link

Installation failure on Windows Vista #2

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
When I attempt install PyRabj, which apparently has jsonlib2 as a
dependency for some reason, I get the following errors and the installation
fails.

OS: Windows Vista Home
Compiler: Visual Studio 9.0 - Microsoft (R) 32-bit C/C++ Optimizing
Compiler Version 15.00.30729.01 for 80x86

C:\Python26\Scripts>easy_install pyrabj
Searching for pyrabj
Reading http://pypi.python.org/simple/pyrabj/
Couldn't find index page for 'pyrabj' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading http://pypi.python.org/simple/
No local packages or download links found for pyrabj
Best match: None
Traceback (most recent call last):
  File "C:\Python26\Scripts\easy_install-script.py", line 8, in <module>
    load_entry_point('setuptools==0.6c11', 'console_scripts', 'easy_install')()
  File "C:\Python26\lib\site-packages\setuptools\command\easy_install.py",
line 1712, in main
    with_ei_usage(lambda:
  File "C:\Python26\lib\site-packages\setuptools\command\easy_install.py",
line 1700, in with_ei_usage
    return f()
  File "C:\Python26\lib\site-packages\setuptools\command\easy_install.py",
line 1716, in <lambda>
    distclass=DistributionWithoutHelpCommands, **kw
  File "C:\Python26\lib\distutils\core.py", line 152, in setup
    dist.run_commands()
  File "C:\Python26\lib\distutils\dist.py", line 975, in run_commands
    self.run_command(cmd)
  File "C:\Python26\lib\distutils\dist.py", line 995, in run_command
    cmd_obj.run()
  File "C:\Python26\lib\site-packages\setuptools\command\easy_install.py",
line 211, in run
    self.easy_install(spec, not self.no_deps)
  File "C:\Python26\lib\site-packages\setuptools\command\easy_install.py",
line 434, in easy_install
    self.local_index
  File "C:\Python26\lib\site-packages\setuptools\package_index.py", line
475, in fetch_distribution
    return dist.clone(location=self.download(dist.location, tmpdir))
AttributeError: 'NoneType' object has no attribute 'clone'

C:\Python26\Scripts>easy_install
http://github.com/kochhar/pyrabj/tarball/master
Downloading http://github.com/kochhar/pyrabj/tarball/master
Processing master
Running kochhar-pyrabj-7dcb317\setup.py -q bdist_egg --dist-dir
c:\users\tom~1.mor\appdata\local\temp\easy_install-kkjv8q\kochhar-pyrabj-7dcb317
\egg-dist-tmp-zupp8l
c:\users\tom~1.mor\appdata\local\temp\easy_install-kkjv8q\kochhar-pyrabj-7dcb317
\scripts\tutorial_bogus_queue.py
is not executable
no previously-included directories found matching 'bin'
no previously-included directories found matching 'build'
no previously-included directories found matching 'include'
no previously-included directories found matching 'sp'
zip_safe flag not set; analyzing archive contents...
Adding pyrabj 0.1 to easy-install.pth file

Installed c:\python26\lib\site-packages\pyrabj-0.1-py2.6.egg
Processing dependencies for pyrabj==0.1
Searching for httplib2>=0.5.0
Reading http://pypi.python.org/simple/httplib2/
Reading http://code.google.com/p/httplib2/
Reading http://bitworking.org/projects/httplib2/
Best match: httplib2 0.6.0
Downloading http://httplib2.googlecode.com/files/httplib2-0.6.0.zip
Processing httplib2-0.6.0.zip
Running httplib2-0.6.0\setup.py -q bdist_egg --dist-dir
c:\users\tom~1.mor\appdata\local\temp\easy_install-yvevo_\httplib2-0.6.0\egg-dis
t-tmp-tblszf
zip_safe flag not set; analyzing archive contents...
Adding httplib2 0.6.0 to easy-install.pth file

Installed c:\python26\lib\site-packages\httplib2-0.6.0-py2.6.egg
Searching for jsonlib2>=1.5.1
Reading http://pypi.python.org/simple/jsonlib2/
Reading http://code.google.com/p/jsonlib2/
Reading http://code.google.com/p/jsonlib2/downloads/list
Best match: jsonlib2 1.5.2
Downloading http://jsonlib2.googlecode.com/files/jsonlib2-1.5.2.tar.gz
Processing jsonlib2-1.5.2.tar.gz
Running jsonlib2-1.5.2\setup.py -q bdist_egg --dist-dir
c:\users\tom~1.mor\appdata\local\temp\easy_install-fjxxcs\jsonlib2-1.5.2\egg-dis
t-tmp-zgxeek
jsonlib2.c
jsonlib2.c(254) : error C2275: 'PyObject' : illegal use of this type as an
expression
        c:\python26\include\object.h(108) : see declaration of 'PyObject'
jsonlib2.c(254) : error C2065: 'space' : undeclared identifier
jsonlib2.c(255) : error C2275: 'PyObject' : illegal use of this type as an
expression
        c:\python26\include\object.h(108) : see declaration of 'PyObject'
jsonlib2.c(255) : error C2065: 'new_string' : undeclared identifier
jsonlib2.c(255) : error C2065: 'space' : undeclared identifier
jsonlib2.c(255) : warning C4047: 'function' : 'PyObject *' differs in
levels of indirection from 'int'
jsonlib2.c(255) : warning C4024: 'PySequence_Repeat' : different types for
formal and actual parameter 1
jsonlib2.c(256) : error C2065: 'new_string' : undeclared identifier
jsonlib2.c(257) : error C2065: 'space' : undeclared identifier
jsonlib2.c(257) : error C2065: 'space' : undeclared identifier
jsonlib2.c(257) : error C2065: 'space' : undeclared identifier
jsonlib2.c(259) : error C2065: 'new_string' : undeclared identifier
jsonlib2.c(259) : warning C4047: 'return' : 'PyObject *' differs in levels
of indirection from 'int'
jsonlib2.c(506) : error C2275: 'PyObject' : illegal use of this type as an
expression
        c:\python26\include\object.h(108) : see declaration of 'PyObject'
jsonlib2.c(506) : error C2065: 'args' : undeclared identifier
jsonlib2.c(508) : error C2065: 'args' : undeclared identifier
jsonlib2.c(511) : error C2275: 'PyObject' : illegal use of this type as an
expression
        c:\python26\include\object.h(108) : see declaration of 'PyObject'
jsonlib2.c(511) : error C2065: 'object' : undeclared identifier
jsonlib2.c(512) : error C2065: 'args' : undeclared identifier
jsonlib2.c(512) : warning C4047: 'function' : 'PyObject *' differs in
levels of indirection from 'int'
jsonlib2.c(512) : warning C4024: 'PyObject_CallObject' : different types
for formal and actual parameter 2
jsonlib2.c(513) : error C2065: 'args' : undeclared identifier
jsonlib2.c(513) : error C2065: 'args' : undeclared identifier
jsonlib2.c(513) : error C2065: 'args' : undeclared identifier
jsonlib2.c(515) : error C2065: 'object' : undeclared identifier
jsonlib2.c(518) : error C2065: 'object' : undeclared identifier
jsonlib2.c(518) : warning C4047: '=' : 'PyObject *' differs in levels of
indirection from 'int'
jsonlib2.c(894) : error C2275: 'PyObject' : illegal use of this type as an
expression
        c:\python26\include\object.h(108) : see declaration of 'PyObject'
jsonlib2.c(894) : error C2065: 'args' : undeclared identifier
jsonlib2.c(897) : error C2065: 'args' : undeclared identifier
jsonlib2.c(897) : warning C4047: 'function' : 'PyObject *' differs in
levels of indirection from 'int'
jsonlib2.c(897) : warning C4024: 'PyObject_CallObject' : different types
for formal and actual parameter 2
jsonlib2.c(899) : error C2065: 'args' : undeclared identifier
jsonlib2.c(899) : error C2065: 'args' : undeclared identifier
jsonlib2.c(899) : error C2065: 'args' : undeclared identifier
jsonlib2.c(2270) : error C2143: syntax error : missing ';' before 'const'
jsonlib2.c(2272) : error C2065: 'msg' : undeclared identifier
jsonlib2.c(2272) : warning C4047: '=' : 'int' differs in levels of
indirection from 'char [27]'
jsonlib2.c(2274) : error C2065: 'msg' : undeclared identifier
jsonlib2.c(2274) : warning C4047: '=' : 'int' differs in levels of
indirection from 'char [28]'
jsonlib2.c(2276) : error C2065: 'msg' : undeclared identifier
jsonlib2.c(2276) : warning C4047: 'function' : 'const char *' differs in
levels of indirection from 'int'
jsonlib2.c(2276) : warning C4024: 'PyErr_SetString' : different types for
formal and actual parameter 2
jsonlib2.c(2549) : error C2275: 'PyObject' : illegal use of this type as an
expression
        c:\python26\include\object.h(108) : see declaration of 'PyObject'
jsonlib2.c(2549) : error C2065: 'separators' : undeclared identifier
jsonlib2.c(2563) : error C2065: 'separators' : undeclared identifier
jsonlib2.c(2567) : error C2065: 'separators' : undeclared identifier
jsonlib2.c(2568) : error C2065: 'separators' : undeclared identifier
jsonlib2.c(2568) : warning C4047: 'function' : 'PyObject *' differs in
levels of indirection from 'int'
jsonlib2.c(2568) : warning C4024: 'PyArg_ParseTuple' : different types for
formal and actual parameter 1
jsonlib2.c(2631) : error C2275: 'PyObject' : illegal use of this type as an
expression
        c:\python26\include\object.h(108) : see declaration of 'PyObject'
jsonlib2.c(2631) : error C2065: 'separators' : undeclared identifier
jsonlib2.c(2645) : error C2065: 'separators' : undeclared identifier
jsonlib2.c(2648) : error C2065: 'separators' : undeclared identifier
jsonlib2.c(2649) : error C2065: 'separators' : undeclared identifier
jsonlib2.c(2649) : warning C4047: 'function' : 'PyObject *' differs in
levels of indirection from 'int'
jsonlib2.c(2649) : warning C4024: 'PyArg_ParseTuple' : different types for
formal and actual parameter 1
error: Setup script exited with error: command '"C:\Program Files\Microsoft
Visual Studio 9.0\VC\BIN\cl.exe"' failed with exit status 2

C:\Python26\Scripts>

Original issue reported on code.google.com by tfmorris on 30 Jan 2010 at 9:54

GoogleCodeExporter commented 8 years ago
Oops, sorry about the extra copy of the bad installation attempt in the 
original report.

Attached is a patch which fixes the compiler dependencies.  GCC still issues a
warning about the use of %r in a format string, but that is in the original 
code, not
something the patch introduced.  

It compiles with Visual Studio 9.0's C compiler as well as GCC 3.4.4, but 
haven't
done much more testing than that so far.

Original comment by tfmorris on 2 Feb 2010 at 7:07

Attachments:

GoogleCodeExporter commented 8 years ago
Patch confirmed to work on Windows 7 Ultimate x64 with VS2008.  I'll be testing 
gcc 4.x 
on Fedora 12 and FreeBSD 8.  Are there other platforms/compilers that need to 
be tested 
before the patch gets integrated?

Original comment by kjw%kjwc...@gtempaccount.com on 1 May 2010 at 6:20

GoogleCodeExporter commented 8 years ago
Works on the default Python (2.6.2) on Fedora 12 x86_64 with gcc version 4.4.3 
20100127 
(Red Hat 4.4.3-4) (GCC).  Didn't work with ActivePython 2.6.5, seemed to 
install to the 
wrong directory (same dir as the system default Python).  I'm not sure if 
that's an 
ActivePython issue or not.

Original comment by kjw%kjwc...@gtempaccount.com on 1 May 2010 at 8:16

GoogleCodeExporter commented 8 years ago
Here's a version that compiles with VS  (it uses C89 instead of C99).

Original comment by g753412...@gmail.com on 4 Mar 2013 at 3:26

Attachments: