Problem with pyspatialite

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem with pyspatialite

Pedro Venâncio
Hi,

I was using QGIS master from nightly repository and it had been working well.

Today I have been compiling the version from github and I have a problem with pyspatialite. It was installed before, but now it does not appear in the repositories (Xubuntu 12.04).

Here is the error that appears when installing the compiled version:

dpkg: problemas com dependências impedem a configuração de python-qgis:
 python-qgis depende de python-pyspatialite; no entanto:
  O pacote python-pyspatialite não está instalado.
dpkg: erro ao processar python-qgis (--install):
 problemas com dependências - a deixar por configurar
A instalar python-qgis-common (1.9.0) ...
(...)
ldconfig deferred processing now taking place
Foram encontrados erros enquanto processava:
 python-qgis


python-qgis appears as "Broken" on Synaptic.


When I start QGIS, some plugins complain about the lack of pyspatialite:

ImportError: No module named pyspatialite



I've also tried to install pyspatialite with pip and easy_install, but without success.

sudo pip install pyspatialite

Downloading/unpacking pyspatialite
  Running setup.py egg_info for package pyspatialite
Installing collected packages: pyspatialite
  Running setup.py install for pyspatialite
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c /tmp/iconvb2Ux5M.c -o tmp/iconvb2Ux5M.o
    /tmp/iconvb2Ux5M.c:1:1: warning: return type defaults to ‘int’ [-Wreturn-type]
    /tmp/iconvb2Ux5M.c: In function ‘main’:
    /tmp/iconvb2Ux5M.c:2:5: warning: implicit declaration of function ‘iconv’ [-Wimplicit-function-declaration]
    /tmp/iconvb2Ux5M.c:3:1: warning: control reaches end of non-void function [-Wreturn-type]
    gcc -pthread tmp/iconvb2Ux5M.o -o a.out
    building 'pyspatialite._spatialite' extension
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DMODULE_NAME="spatialite.dbapi2" -DVERSION="3.0.1" -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_ENABLE_COLUMN_METADATA=1 -DOMIT_FREEXL=1 -I/Library/Frameworks/GEOS.framework/unix/include/ -I/Library/Frameworks/PROJ.framework/unix/include/ -Iamalgamation -I/usr/include/python2.7 -c src/module.c -o build/temp.linux-i686-2.7/src/module.o
    In file included from src/module.c:24:0:
    src/connection.h:36:5: error: conflicting types for ‘spatialite_init’
    /usr/include/spatialite.h:92:29: note: previous declaration of ‘spatialite_init’ was here
    error: command 'gcc' failed with exit status 1
    Complete output from command /usr/bin/python -c "import setuptools;__file__='/home/pedro/build/pyspatialite/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-MO3kIB-record/install-record.txt:
    running install
running build
running build_py
running build_ext
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c /tmp/iconvb2Ux5M.c -o tmp/iconvb2Ux5M.o
/tmp/iconvb2Ux5M.c:1:1: warning: return type defaults to ‘int’ [-Wreturn-type]
/tmp/iconvb2Ux5M.c: In function ‘main’:
/tmp/iconvb2Ux5M.c:2:5: warning: implicit declaration of function ‘iconv’ [-Wimplicit-function-declaration]
/tmp/iconvb2Ux5M.c:3:1: warning: control reaches end of non-void function [-Wreturn-type]
gcc -pthread tmp/iconvb2Ux5M.o -o a.out
building 'pyspatialite._spatialite' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DMODULE_NAME="spatialite.dbapi2" -DVERSION="3.0.1" -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_ENABLE_COLUMN_METADATA=1 -DOMIT_FREEXL=1 -I/Library/Frameworks/GEOS.framework/unix/include/ -I/Library/Frameworks/PROJ.framework/unix/include/ -Iamalgamation -I/usr/include/python2.7 -c src/module.c -o build/temp.linux-i686-2.7/src/module.o
In file included from src/module.c:24:0:
src/connection.h:36:5: error: conflicting types for ‘spatialite_init’
/usr/include/spatialite.h:92:29: note: previous declaration of ‘spatialite_init’ was here

error: command 'gcc' failed with exit status 1
----------------------------------------
Command /usr/bin/python -c "import setuptools;__file__='/home/pedro/build/pyspatialite/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-MO3kIB-record/install-record.txt failed with error code 1
Storing complete log in /home/pedro/.pip/pip.log



sudo easy_install pyspatialite

Searching for pyspatialite
Reading http://pypi.python.org/simple/pyspatialite/
Reading http://pyspatialite.googlecode.com/
Reading http://code.google.com/p/pyspatialite/downloads/list
Best match: pyspatialite 3.0.1
Downloading http://pypi.python.org/packages/source/p/pyspatialite/pyspatialite-3.0.1.tar.gz#md5=28a6ab34b5003772e9468f2712100586
Processing pyspatialite-3.0.1.tar.gz
Running pyspatialite-3.0.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-zfgdJp/pyspatialite-3.0.1/egg-dist-tmp-enV8r4
Downloading amalgation.
Traceback (most recent call last):
  File "/usr/bin/easy_install", line 9, in <module>
    load_entry_point('distribute==0.6.24dev-r0', 'console_scripts', 'easy_install')()
  File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1931, in main
    with_ei_usage(lambda:
  File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1912, in with_ei_usage
    return f()
  File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1935, in <lambda>
    distclass=DistributionWithoutHelpCommands, **kw
  File "/usr/lib/python2.7/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 368, in run
    self.easy_install(spec, not self.no_deps)
  File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 608, in easy_install
    return self.install_item(spec, dist.location, tmpdir, deps)
  File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 638, in install_item
    dists = self.install_eggs(spec, download, tmpdir)
  File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 828, in install_eggs
    return self.build_and_install(setup_script, setup_base)
  File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1105, in build_and_install
    self.run_setup(setup_script, setup_base, args)
  File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1094, in run_setup
    run_setup(setup_script, args)
  File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 30, in run_setup
    lambda: execfile(
  File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 72, in run
    return func()
  File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 32, in <lambda>
    {'__file__':setup_script, '__name__':'__main__'}
  File "setup.py", line 219, in <module>
  File "setup.py", line 216, in main
  File "/usr/lib/python2.7/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/usr/lib/python2.7/dist-packages/setuptools/command/bdist_egg.py", line 179, in run
    cmd = self.call_command('install_lib', warn_dir=0)
  File "/usr/lib/python2.7/dist-packages/setuptools/command/bdist_egg.py", line 166, in call_command
    self.run_command(cmdname)
  File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/usr/lib/python2.7/dist-packages/setuptools/command/install_lib.py", line 20, in run
    self.build()
  File "/usr/lib/python2.7/distutils/command/install_lib.py", line 111, in build
    self.run_command('build_ext')
  File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/usr/lib/python2.7/distutils/command/build_ext.py", line 339, in run
    self.build_extensions()
  File "/usr/lib/python2.7/distutils/command/build_ext.py", line 448, in build_extensions
    self.build_extension(ext)
  File "setup.py", line 116, in build_extension
  File "setup.py", line 97, in get_amalgamation
IndexError: list index out of range


Has anyone encountered this problem? How can it be solved?
_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: Problem with pyspatialite

Pedro Venâncio
Hi,

I solved installing python-pyspatialite from

http://pkgs.org/debian-wheezy/debian-main-i386/python-pyspatialite_3.0.1-2_i386.deb/download/ 


Thanks,
Pedro




----- Original Message -----
From: Pedro Venâncio

Hi,

I was using QGIS master from nightly repository and it had been working well.

Today I have been compiling the version from github and I have a problem with pyspatialite. It was installed before, but now it does not appear in the repositories (Xubuntu 12.04).

Here is the error that appears when installing the compiled version:

dpkg: problemas com dependências impedem a configuração de python-qgis:
 python-qgis depende de python-pyspatialite; no entanto:
  O pacote python-pyspatialite não está instalado.
dpkg: erro ao processar python-qgis (--install):
 problemas com dependências - a deixar por configurar
A instalar python-qgis-common (1.9.0) ...
(...)
ldconfig deferred processing now taking place
Foram encontrados erros enquanto processava:
 python-qgis


python-qgis appears as "Broken" on Synaptic.


When I start QGIS, some plugins complain about the lack of pyspatialite:

ImportError: No module named pyspatialite



I've also tried to install pyspatialite with pip and easy_install, but without success.

sudo pip install pyspatialite

Downloading/unpacking pyspatialite
  Running setup.py egg_info for package pyspatialite
Installing collected packages: pyspatialite
  Running setup.py install for pyspatialite
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c /tmp/iconvb2Ux5M.c -o tmp/iconvb2Ux5M.o
    /tmp/iconvb2Ux5M.c:1:1: warning: return type defaults to ‘int’ [-Wreturn-type]
    /tmp/iconvb2Ux5M.c: In function ‘main’:
    /tmp/iconvb2Ux5M.c:2:5: warning: implicit declaration of function ‘iconv’ [-Wimplicit-function-declaration]
    /tmp/iconvb2Ux5M.c:3:1: warning: control reaches end of non-void function [-Wreturn-type]
    gcc -pthread tmp/iconvb2Ux5M.o -o a.out
    building 'pyspatialite._spatialite' extension
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DMODULE_NAME="spatialite.dbapi2" -DVERSION="3.0.1" -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_ENABLE_COLUMN_METADATA=1 -DOMIT_FREEXL=1 -I/Library/Frameworks/GEOS.framework/unix/include/ -I/Library/Frameworks/PROJ.framework/unix/include/ -Iamalgamation -I/usr/include/python2.7 -c src/module.c -o build/temp.linux-i686-2.7/src/module.o
    In file included from src/module.c:24:0:
    src/connection.h:36:5: error: conflicting types for ‘spatialite_init’
    /usr/include/spatialite.h:92:29: note: previous declaration of ‘spatialite_init’ was here
    error: command 'gcc' failed with exit status 1
    Complete output from command /usr/bin/python -c "import setuptools;__file__='/home/pedro/build/pyspatialite/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-MO3kIB-record/install-record.txt:
    running install
running build
running build_py
running build_ext
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c /tmp/iconvb2Ux5M.c -o tmp/iconvb2Ux5M.o
/tmp/iconvb2Ux5M.c:1:1: warning: return type defaults to ‘int’ [-Wreturn-type]
/tmp/iconvb2Ux5M.c: In function ‘main’:
/tmp/iconvb2Ux5M.c:2:5: warning: implicit declaration of function ‘iconv’ [-Wimplicit-function-declaration]
/tmp/iconvb2Ux5M.c:3:1: warning: control reaches end of non-void function [-Wreturn-type]
gcc -pthread tmp/iconvb2Ux5M.o -o a.out
building 'pyspatialite._spatialite' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DMODULE_NAME="spatialite.dbapi2" -DVERSION="3.0.1" -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_ENABLE_COLUMN_METADATA=1 -DOMIT_FREEXL=1 -I/Library/Frameworks/GEOS.framework/unix/include/ -I/Library/Frameworks/PROJ.framework/unix/include/ -Iamalgamation -I/usr/include/python2.7 -c src/module.c -o build/temp.linux-i686-2.7/src/module.o
In file included from src/module.c:24:0:
src/connection.h:36:5: error: conflicting types for ‘spatialite_init’
/usr/include/spatialite.h:92:29: note: previous declaration of ‘spatialite_init’ was here

error: command 'gcc' failed with exit status 1
----------------------------------------
Command /usr/bin/python -c "import setuptools;__file__='/home/pedro/build/pyspatialite/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-MO3kIB-record/install-record.txt failed with error code 1
Storing complete log in /home/pedro/.pip/pip.log



sudo easy_install pyspatialite

Searching for pyspatialite
Reading http://pypi.python.org/simple/pyspatialite/
Reading http://pyspatialite.googlecode.com/
Reading http://code.google.com/p/pyspatialite/downloads/list
Best match: pyspatialite 3.0.1
Downloading http://pypi.python.org/packages/source/p/pyspatialite/pyspatialite-3.0.1.tar.gz#md5=28a6ab34b5003772e9468f2712100586
Processing pyspatialite-3.0.1.tar.gz
Running pyspatialite-3.0.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-zfgdJp/pyspatialite-3.0.1/egg-dist-tmp-enV8r4
Downloading amalgation.
Traceback (most recent call last):
  File "/usr/bin/easy_install", line 9, in <module>
    load_entry_point('distribute==0.6.24dev-r0', 'console_scripts', 'easy_install')()
  File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1931, in main
    with_ei_usage(lambda:
  File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1912, in with_ei_usage
    return f()
  File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1935, in <lambda>
    distclass=DistributionWithoutHelpCommands, **kw
  File "/usr/lib/python2.7/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 368, in run
    self.easy_install(spec, not self.no_deps)
  File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 608, in easy_install
    return self.install_item(spec, dist.location, tmpdir, deps)
  File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 638, in install_item
    dists = self.install_eggs(spec, download, tmpdir)
  File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 828, in install_eggs
    return self.build_and_install(setup_script, setup_base)
  File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1105, in build_and_install
    self.run_setup(setup_script, setup_base, args)
  File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1094, in run_setup
    run_setup(setup_script, args)
  File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 30, in run_setup
    lambda: execfile(
  File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 72, in run
    return func()
  File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 32, in <lambda>
    {'__file__':setup_script, '__name__':'__main__'}
  File "setup.py", line 219, in <module>
  File "setup.py", line 216, in main
  File "/usr/lib/python2.7/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/usr/lib/python2.7/dist-packages/setuptools/command/bdist_egg.py", line 179, in run
    cmd = self.call_command('install_lib', warn_dir=0)
  File "/usr/lib/python2.7/dist-packages/setuptools/command/bdist_egg.py", line 166, in call_command
    self.run_command(cmdname)
  File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/usr/lib/python2.7/dist-packages/setuptools/command/install_lib.py", line 20, in run
    self.build()
  File "/usr/lib/python2.7/distutils/command/install_lib.py", line 111, in build
    self.run_command('build_ext')
  File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/usr/lib/python2.7/distutils/command/build_ext.py", line 339, in run
    self.build_extensions()
  File "/usr/lib/python2.7/distutils/command/build_ext.py", line 448, in build_extensions
    self.build_extension(ext)
  File "setup.py", line 116, in build_extension
  File "setup.py", line 97, in get_amalgamation
IndexError: list index out of range


Has anyone encountered this problem? How can it be solved?

_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer