That was it. I was missing python packages
Thank you Panos
------ Original Message ------
From: Panagiotis Koutsourakis
To: users-list@monetdb.org
Sent: January 21, 2020 at 7:54 AM
Subject: Re: embedded python in latest release
Hello Alex,
make sure that you have the MonetDB-python or MonetDB-python3 packages installed:
dnf install MonetDB-python
or
dnf install MonetDB-python3
Also you will need to notify the MonetDB server that you want to start with embedded python support. If you are starting the server using the MonetDB daemon, you need to set the relevant property for your database:
monetdb set embedpy=true <database>
or
monetdb set embedpy3=true <database>
If you are starting the server by hand, then
mserver5 --dbpath=/path/to/database --set embedded_py=2
or
mserver5 --dbpath=/path/to/database --set embedded_py=3
Best regards,
Panos.
On 1/21/20 5:11 AM, ALEX OSSIPOV wrote:
Roberto
I have all mentioned packages installed.
I do not have any issues with R though. Centos based instance also works fine.
Thanks
Alex
On January 20, 2020 at 3:49 AM Roberto Cornacchia wrote:
Alex,
Do you have packages python3-devel python3-numpy (python2-devel python2-numpy for python 2) installed in your Fedora system?
Yes, you can import what you like in the body of your function, as long as the package is installed in your system.
Roberto
On Sun, 19 Jan 2020 at 00:12, ALEX OSSIPOV < alexo15@comcast.net mailto:alexo15@comcast.net > wrote:
I am having problem enabling embedded python in latest realease, MonetDB 5 server v11.35.9 (Nov2019-SP1)
My 64bit Fedora environment has multiple versions of both python 2 and 3 wih 32 and 64 bit libs.
MonetDB was installed following https://www.monetdb.org/downloads/Fedora/
with additional SELinux.
I tried random_integers function from documentation with both embedpy=true and embedpy3=true separately but getting the same type of error:
SQL Error [22000]: TypeException:user.s10_0[9]:'pyapi3.eval' undefined in: X_10:bat[:int] := pyapi3.eval(0x559cb0440270:ptr, "{ \n return numpy.random.randint(low, high, size=(amount,))\n}\n;":str, X_7:int, X_8:int, X_9:int);
Both py2 and py3 versions work fine on my computer.
How do I properly point to a specific python version to be used by MonetDB?
Are there any specific env variables that should be set prior to installation/db creation? I tried to define PYTHONPATH but it did not help.
Aside question: Can additional modules be imported in function body for PYTHON type functions or does it only work with numpy?
Thanks Alex
_______________________________________________
users-list mailing list
users-list@monetdb.org mailto:users-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/users-list
_______________________________________________
users-list mailing list
users-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/users-list
_______________________________________________
users-list mailing list
users-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/users-list