python sqlite3 error in FreeBSD 9
Question: Trying to install this ipython version. infact there's a django-starter
project which uses buildout for his needs.. And that scripts tried to get
ipython 0.11 with easy_install.I tried to grep everything out from this
package but there's no ipython mentioned in any files at all. so I can't
install newer version I need ipython0.11 to work. Please =)

    
    
        roman# easy_install "ipython==0.11" > errors
    Traceback (most recent call last):
      File "/usr/local/bin/easy_install", line 8, in <module>
        load_entry_point('setuptools==0.6c11', 'console_scripts', 'easy_install')()
      File "build/bdist.freebsd-9.0-RC1-amd64/egg/setuptools/command/easy_install.py", line 1712, in main
      File "build/bdist.freebsd-9.0-RC1-amd64/egg/setuptools/command/easy_install.py", line 1700, in with_ei_usage
      File "build/bdist.freebsd-9.0-RC1-amd64/egg/setuptools/command/easy_install.py", line 1716, in <lambda>
      File "/usr/local/lib/python2.7/distutils/core.py", line 152, in setup
        dist.run_commands()
      File "/usr/local/lib/python2.7/distutils/dist.py", line 953, in run_commands
        self.run_command(cmd)
      File "/usr/local/lib/python2.7/distutils/dist.py", line 972, in run_command
        cmd_obj.run()
      File "build/bdist.freebsd-9.0-RC1-amd64/egg/setuptools/command/easy_install.py", line 211, in run
      File "build/bdist.freebsd-9.0-RC1-amd64/egg/setuptools/command/easy_install.py", line 446, in easy_install
      File "build/bdist.freebsd-9.0-RC1-amd64/egg/setuptools/command/easy_install.py", line 476, in install_item
      File "build/bdist.freebsd-9.0-RC1-amd64/egg/setuptools/command/easy_install.py", line 655, in install_eggs
      File "build/bdist.freebsd-9.0-RC1-amd64/egg/setuptools/command/easy_install.py", line 930, in build_and_install
      File "build/bdist.freebsd-9.0-RC1-amd64/egg/setuptools/command/easy_install.py", line 919, in run_setup
      File "build/bdist.freebsd-9.0-RC1-amd64/egg/setuptools/sandbox.py", line 62, in run_setup
      File "build/bdist.freebsd-9.0-RC1-amd64/egg/setuptools/sandbox.py", line 105, in run
      File "build/bdist.freebsd-9.0-RC1-amd64/egg/setuptools/sandbox.py", line 64, in <lambda>
      File "setup.py", line 54, in <module>
      File "/tmp/easy_install-4FA3NZ/ipython-0.11/IPython/__init__.py", line 46, in <module>
      File "/tmp/easy_install-4FA3NZ/ipython-0.11/IPython/frontend/terminal/embed.py", line 32, in <module>
      File "/tmp/easy_install-4FA3NZ/ipython-0.11/IPython/frontend/terminal/interactiveshell.py", line 26, in <module>
      File "/tmp/easy_install-4FA3NZ/ipython-0.11/IPython/core/interactiveshell.py", line 36, in <module>
      File "/tmp/easy_install-4FA3NZ/ipython-0.11/IPython/core/history.py", line 20, in <module>
      File "/usr/local/lib/python2.7/sqlite3/__init__.py", line 24, in <module>
        from dbapi2 import *
      File "/usr/local/lib/python2.7/sqlite3/dbapi2.py", line 85, in <module>
        register_adapters_and_converters()
      File "/usr/local/lib/python2.7/sqlite3/dbapi2.py", line 80, in register_adapters_and_converters
        register_adapter(datetime.date, adapt_date)
    NameError: global name 'register_adapter' is not defined
    

**update:**

importing sqlite3 from python console gives this error:

    
    
    >>> import sqlite3
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/usr/local/lib/python2.7/sqlite3/__init__.py", line 24, in <module>
        from dbapi2 import *
      File "/usr/local/lib/python2.7/sqlite3/dbapi2.py", line 85, in <module>
        register_adapters_and_converters()
      File "/usr/local/lib/python2.7/sqlite3/dbapi2.py", line 80, in register_adapters_and_converters
        register_adapter(datetime.date, adapt_date)
    NameError: global name 'register_adapter' is not defined
    


Answer: Judging from your error message and our exchange in the comments, I think the
big problem is you might just be missing sqlite3 support for python.

From your error messages I take it you're running FreeBSD, so you should
install the `databases/py-sqlite3` package from ports.

I don't know much about FreeBSD's ports system, but after you install the py-
sqlite3 package, your problem should hopefully be cleared up.

I'm going to assume, from brief reading, you do something like this, assuming
you have the ports tree on your system:

    
    
    cd /usr/ports/databases/py-sqlite3
    make && make install
    

