1

Failed to install sqlite wrapper. Any help with installation will be really helpful.

Downloaded from

Installed sqlite3.version '2.6.0'

Please find the error log below-

sudo python setup.py install test
running install
running build
running build_ext
SQLite: Using system sqlite include/libraries
running install_lib
running install_egg_info
Removing /Library/Python/2.7/site-packages/apsw-3.7.16.2_r1-py2.7.egg-info
Writing /Library/Python/2.7/site-packages/apsw-3.7.16.2_r1-py2.7.egg-info
running test
Traceback (most recent call last):
File "setup.py", line 857, in <module>
 'win64hackvars': win64hackvars}
 File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 152, in setup
dist.run_commands()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "setup.py", line 102, in run
import tests
 File "/Users/tj/Downloads/apsw-3.7.16.2-r1/tests.py", line 9, in <module>
import apsw
ImportError: dlopen(/Users/tj/Downloads/apsw-3.7.16.2-r1/apsw.so, 2): Symbol not found: _sqlite3_db_filename
Referenced from: /Users/tj/Downloads/apsw-3.7.16.2-r1/apsw.so
Expected in: flat namespace
in /Users/tj/Downloads/apsw-3.7.16.2-r1/apsw.so
VLAZ
  • 26,331
  • 9
  • 49
  • 67
TJC
  • 43
  • 5

1 Answers1

0

It is picking up the system SQLite shared library which is an older version. MacOS tends to ignore the SQLite library you want it to use and force using a known system one. (Many OS components like CoreData depend on SQLite which is why they like to force using a known good version.)

The easiest fix is to use the command line as specified in the documentation. It ensures a private copy of SQLite is embedded in the extension and hence will always work.

http://apidoc.apsw.googlecode.com/hg/build.html#recommended

python setup.py fetch --all build --enable-all-extensions install test

(I'm the APSW author). BTW there is a python-sqlite mailing list which you may find useful.

Roger Binns
  • 3,203
  • 1
  • 24
  • 33
  • ,Thanks for answering my question. It failed with the following command and please find the error message.If you can identify it,it would be helpful.I installed in ubuntu and it works successfully. sudo python setup.py fetch --all build --enable-all-extensions install test Getting download page to work out current SQLite version Fetching https://sqlite.org/download.html Error Try # 2 Error Try # 3 – TJC Apr 29 '13 at 08:16
  • You'll find the mail list easier. You are getting connection reset by peer for any number of reasons ranging from the SQLite site having issues, proxy servers, NAT devices losing their mind, your OS being silly, firewalls and who knows what else. There is absolutely nothing the setup.py script can do about this, and it is likely to work if you try later. – Roger Binns Apr 29 '13 at 22:20