Hi Stefan,

It sounds like I could still use monetdb in python3.2 ?   Awesome!   And thank you very much for prompt reply.

I have tried two methods installing python-monetdb.

Ubuntu 12.04.04 LTS, default python is python 2.7.  I installed python 3.2 from ubuntu's official repo with simple 'apt-get install`.

python-monetdb could work under python 2.7 but not under python 3.2.

1. Install via pip3
 
$ sudo pip3 install python-monetdb

sudo pip3 install python-monetdb
Downloading/unpacking python-monetdb
  Downloading python-monetdb-11.16.0.7.tar.gz
  Running setup.py (path:/tmp/pip_build_root/python-monetdb/setup.py) egg_info for package python-monetdb
    
Installing collected packages: python-monetdb
  Running setup.py install for python-monetdb
      File "/usr/local/lib/python3.2/dist-packages/monetdb/mapi.py", line 201
        except ValueError, e:
                         ^
    SyntaxError: invalid syntax
    
    
Successfully installed python-monetdb
Cleaning up...

$ python3
Python 3.2.3 (default, Feb 27 2014, 21:31:18) 
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import monetdb
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.2/dist-packages/monetdb/__init__.py", line 27, in <module>
    from monetdb import sql
  File "/usr/local/lib/python3.2/dist-packages/monetdb/sql/__init__.py", line 18, in <module>
    from monetdb.sql.connections import Connection
  File "/usr/local/lib/python3.2/dist-packages/monetdb/sql/connections.py", line 20, in <module>
    from monetdb.sql import cursors
  File "/usr/local/lib/python3.2/dist-packages/monetdb/sql/cursors.py", line 20, in <module>
    from monetdb.sql import monetize, pythonize
  File "/usr/local/lib/python3.2/dist-packages/monetdb/sql/monetize.py", line 27, in <module>
    from monetdb.exceptions import ProgrammingError
  File "/usr/local/lib/python3.2/dist-packages/monetdb/exceptions.py", line 22, in <module>
    class Warning(StandardError):
NameError: name 'StandardError' is not defined
>>> 

2. Then, uninstall from pip3

$ sudo pip3 uninstall python-monetdb    

and install from tar:

Download python-monetdb-11.16.0.7.tar.gz  from https://pypi.python.org/pypi/python-monetdb/11.16.0.7

Extract the files and

$ sudo python3 setup.py install
[sudo] password for simon: 
running install
running build
running build_py
creating build
creating build/lib
creating build/lib/monetdb
copying monetdb/control.py -> build/lib/monetdb
copying monetdb/mapi.py -> build/lib/monetdb
copying monetdb/exceptions.py -> build/lib/monetdb
copying monetdb/__init__.py -> build/lib/monetdb
creating build/lib/monetdb/sql
copying monetdb/sql/connections.py -> build/lib/monetdb/sql
copying monetdb/sql/cursors.py -> build/lib/monetdb/sql
copying monetdb/sql/types.py -> build/lib/monetdb/sql
copying monetdb/sql/converters.py -> build/lib/monetdb/sql
copying monetdb/sql/monetize.py -> build/lib/monetdb/sql
copying monetdb/sql/__init__.py -> build/lib/monetdb/sql
copying monetdb/sql/pythonize.py -> build/lib/monetdb/sql
running install_lib
creating /usr/local/lib/python3.2/dist-packages/monetdb
copying build/lib/monetdb/control.py -> /usr/local/lib/python3.2/dist-packages/monetdb
creating /usr/local/lib/python3.2/dist-packages/monetdb/sql
copying build/lib/monetdb/sql/connections.py -> /usr/local/lib/python3.2/dist-packages/monetdb/sql
copying build/lib/monetdb/sql/cursors.py -> /usr/local/lib/python3.2/dist-packages/monetdb/sql
copying build/lib/monetdb/sql/types.py -> /usr/local/lib/python3.2/dist-packages/monetdb/sql
copying build/lib/monetdb/sql/converters.py -> /usr/local/lib/python3.2/dist-packages/monetdb/sql
copying build/lib/monetdb/sql/monetize.py -> /usr/local/lib/python3.2/dist-packages/monetdb/sql
copying build/lib/monetdb/sql/__init__.py -> /usr/local/lib/python3.2/dist-packages/monetdb/sql
copying build/lib/monetdb/sql/pythonize.py -> /usr/local/lib/python3.2/dist-packages/monetdb/sql
copying build/lib/monetdb/mapi.py -> /usr/local/lib/python3.2/dist-packages/monetdb
copying build/lib/monetdb/exceptions.py -> /usr/local/lib/python3.2/dist-packages/monetdb
copying build/lib/monetdb/__init__.py -> /usr/local/lib/python3.2/dist-packages/monetdb
byte-compiling /usr/local/lib/python3.2/dist-packages/monetdb/control.py to control.cpython-32.pyc
byte-compiling /usr/local/lib/python3.2/dist-packages/monetdb/sql/connections.py to connections.cpython-32.pyc
byte-compiling /usr/local/lib/python3.2/dist-packages/monetdb/sql/cursors.py to cursors.cpython-32.pyc
byte-compiling /usr/local/lib/python3.2/dist-packages/monetdb/sql/types.py to types.cpython-32.pyc
byte-compiling /usr/local/lib/python3.2/dist-packages/monetdb/sql/converters.py to converters.cpython-32.pyc
byte-compiling /usr/local/lib/python3.2/dist-packages/monetdb/sql/monetize.py to monetize.cpython-32.pyc
byte-compiling /usr/local/lib/python3.2/dist-packages/monetdb/sql/__init__.py to __init__.cpython-32.pyc
byte-compiling /usr/local/lib/python3.2/dist-packages/monetdb/sql/pythonize.py to pythonize.cpython-32.pyc
byte-compiling /usr/local/lib/python3.2/dist-packages/monetdb/mapi.py to mapi.cpython-32.pyc
  File "/usr/local/lib/python3.2/dist-packages/monetdb/mapi.py", line 201
    except ValueError, e:
                     ^
SyntaxError: invalid syntax

byte-compiling /usr/local/lib/python3.2/dist-packages/monetdb/exceptions.py to exceptions.cpython-32.pyc
byte-compiling /usr/local/lib/python3.2/dist-packages/monetdb/__init__.py to __init__.cpython-32.pyc
running install_egg_info
Writing /usr/local/lib/python3.2/dist-packages/python_monetdb-11.16.0.7.egg-info

$ python3
Python 3.2.3 (default, Feb 27 2014, 21:31:18) 
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import monetdb
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "monetdb/__init__.py", line 27, in <module>
    from monetdb import sql
  File "monetdb/sql/__init__.py", line 18, in <module>
    from monetdb.sql.connections import Connection
  File "monetdb/sql/connections.py", line 20, in <module>
    from monetdb.sql import cursors
  File "monetdb/sql/cursors.py", line 20, in <module>
    from monetdb.sql import monetize, pythonize
  File "monetdb/sql/monetize.py", line 27, in <module>
    from monetdb.exceptions import ProgrammingError
  File "monetdb/exceptions.py", line 22, in <module>
    class Warning(StandardError):
NameError: name 'StandardError' is not defined
>>> 


Actually I have tried to modify the codes a little such as change ''class Warning(StandardError)" to "class Warning(BaseException)",  change "except ValueError, e" to "except ValueError as e".  These two error messages disappeard but other error messages popped up.   

By the way, monetdb is so fast that the performance is comparable to kdb+.   Cool!

Regards,
Simon






On Wed, Mar 12, 2014 at 10:53 PM, Stefan Manegold <Stefan.Manegold@cwi.nl> wrote:
Dear Simon,

thank for your kind words about MonetB ;-)

I might overlook something obvious,
but could you please elaborate a bit more about
what is missing to use MonetDB with Python 3.2?

Thanks!
Stefan

----- Simon <simon7199@gmail.com> wrote:
> Hi thanks for the great project.
>
> I just wonder when there would be python 3.2 support.   Is there any way
> that we could use monetdb in python 3.2 before the official package?
>
> Thanks again.
>
> Simon

--
| Stefan.Manegold@CWI.nl | DB Architectures   (DA) |
| www.CWI.nl/~manegold/  | Science Park 123 (L321) |
| +31 (0)20 592-4212     | 1098 XG Amsterdam  (NL) |
_______________________________________________
users-list mailing list
users-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/users-list