[Zoo-discuss] compile zoo kernel with python 3.7

Gérald Fenoy gerald.fenoy at geolabs.fr
Thu Feb 6 15:30:33 PST 2020


Hi Kobe,
using the nm with -D option should provide the list of exported symbols from a dynamic library. You can combine this command with grep to find only the function you are searching for, hence in this case the PyObject_CallObject function.

Can you please try to add the following on line 620 - 621 to change :

 sed -e -e 's/.*\(python[[0-9]]\.[[0-9]]\).*/\1/‘

Into this:

python-config --libs | awk {'print $1'}  | sed "s:-l::g »

It looks less fancy but should work properly.

Best regards,

Gérald Fenoy
ZOO-Project PSC Chair

> Le 5 févr. 2020 à 12:37, Kobe De Decker <kobededecker at gmail.com> a écrit :
> 
> Hi Gerald,
> 
> thank you for you reply.
> 
> I just tried this but it doesn't make a difference.
> Don't know if i can add screen captures here but i'll try:
> <image.png>
> I think the pyvers is rather used for finding libpython, and this one has the minor version attached to it. So entering 3 or 3.7 results in the same error. Python-config is found correctly.
> 
> Where could i check if the PyObject_CallObject element is included in the python distribution?
> 
> thanks,
> 
> Kobe
> 
> 
> Op wo 5 feb. 2020 om 10:39 schreef Gérald Fenoy <gerald.fenoy at geolabs.fr>:
> Hi Kobe,
> sorry for late reply.
> 
> The Python 3 should be correctly supported, at least it is the version that is currently used within MapMint thanks to the work started during last year GSoC by Fenil Mehta (ref. https://github.com/fenilgmehta/mapmint ).
> 
> Thanks for your feedback about the comment line (617 of configure.ac) which is wrongly referring to libphp when lib python is verified, this will be fixed. For the version number, it is mainly used to find the right python-config that may be named python3-config on some platform (usually where there are both python 2 and 3 available), hence you can specify the specific version number you want to use. 
> 
> Nevertheless, from what you have provided I can notice that you mentioned the major, minor version number when only the major version is expected. Supposing that there is a « python-config » program named python3-config from your build system, then it should be ok and the python library should be properly found.
> 
> Hence, I suppose that in case you run you configure command by replacing the —with-pyvers=3.7 by —with-python=3 it should work.
> 
> I hope it helps.
> 
> Best regards,
> 
> Gérald Fenoy
> ZOO-Project PSC Chair
> 
> 
> 
>> Le 4 févr. 2020 à 11:33, Kobe De Decker <kobededecker at gmail.com> a écrit :
>> 
>> Hi there,
>> 
>> I was using Zoo WPS successfully for many projects using it in a Docker image i built myself. Lately Python 2.7 has been deprecated, and I can't deploy new zoo services anymore as many of my processes use numpy and I get installation errors saying that numpy cant be installed anymore on this old Python.
>> 
>> I have been trying to compile the Kernel with Python 3.x (in Conda) for a couple of days now, but am stuck on the last phase of the configure step. This is wat I enter:
>> 
>> ./configure --with-python=/opt/app-root/src/miniconda3 --with-pyvers=3.7  --prefix=/usr --libdir=/usr/lib64
>> 
>> But the process breaks on this line:
>> 
>> checking Python.h usability... yes
>> checking Python.h presence... yes
>> checking for Python.h... yes
>> checking for PyObject_CallObject in -lpython3.7... no
>> configure: error: could not find libpython
>> 
>> So the configure phase definitely finds my python installation, but fails its last check. If i check in configure and configure.ac files, this should have something to do with linking with libphp (while I dont need php for my processes .. ).
>> 
>> When I install python included in Centos repositories (2.7), the configure phase just passes without errors .. 
>> 
>> 
>> Any clues? 
>> 
>> Thanks,
>> 
>> Kobe
>> _______________________________________________
>> Zoo-discuss mailing list
>> Zoo-discuss at lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/zoo-discuss
> 



More information about the Zoo-discuss mailing list