Обсуждение: pgadmin4: The python-config executable could not be found.
Hi all, just cloned the git repository and tried to compile it on my ubuntu 15.04 x64: % qmake Project MESSAGE: Building for QT4... Project MESSAGE: Building for Linux/Mac... Project ERROR: The python-config executable could not be found. Ensure Python is installed and in the system path. However, I've got python 2.7.10 installed and in the path. I'm not a python expert, what am I missing? Thanks, Luca
On Sunday, April 17, 2016, Luca Ferrari <fluca1978@infinito.it> wrote:
Hi all,
just cloned the git repository and tried to compile it on my ubuntu 15.04 x64:
% qmake
Project MESSAGE: Building for QT4...
Project MESSAGE: Building for Linux/Mac...
Project ERROR: The python-config executable could not be found. Ensure
Python is installed and in the system path.
However, I've got python 2.7.10 installed and in the path.
I'm not a python expert, what am I missing?
A python-devel or equivalent package perhaps?
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
On 2016-04-17 11:01 AM, Dave Page wrote: > On Sunday, April 17, 2016, Luca Ferrari <fluca1978@infinito.it> wrote: > > Hi all, > just cloned the git repository and tried to compile it on my ubuntu 15.04 x64: > > % qmake > Project MESSAGE: Building for QT4... > Project MESSAGE: Building for Linux/Mac... > Project ERROR: The python-config executable could not be found. Ensure > Python is installed and in the system path. > > However, I've got python 2.7.10 installed and in the path. > I'm not a python expert, what am I missing? > > A python-devel or equivalent package perhaps? Akin to Dave's response, perhaps your problem is that the installed python package is only complete if you are just running pure Python code against it, whereas if you are building anything C-level against Python eg some kind of extension then you would need a python-devel like package to give you the relevant C header files which you otherwise don't have. -- Darren Duncan
Hello Luca, Try using apt-file: sudo apt-get install apt-file sudo apt-file update sudo apt-file search python-config And you will get a list with the package and filenames ... from which probably you'll need "python-dev" Cheers, Csaba -----Original Message----- From: pgadmin-support-owner@postgresql.org [mailto:pgadmin-support-owner@postgresql.org] On Behalf Of Luca Ferrari Sent: Sunday, April 17, 2016 7:39 PM To: pgadmin-support@postgresql.org Subject: [pgadmin-support] pgadmin4: The python-config executable could not be found. Hi all, just cloned the git repository and tried to compile it on my ubuntu 15.04 x64: % qmake Project MESSAGE: Building for QT4... Project MESSAGE: Building for Linux/Mac... Project ERROR: The python-config executable could not be found. Ensure Python is installed and in the system path. However, I've got python 2.7.10 installed and in the path. I'm not a python expert, what am I missing? Thanks, Luca -- Sent via pgadmin-support mailing list (pgadmin-support@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-support
Вложения
On Mon, Apr 18, 2016 at 12:29 AM, Darren Duncan <darren@darrenduncan.net> wrote: > Akin to Dave's response, perhaps your problem is that the installed python > package is only complete if you are just running pure Python code against > it, whereas if you are building anything C-level against Python eg some kind > of extension then you would need a python-devel like package to give you the > relevant C header files which you otherwise don't have. -- Darren Duncan I've installed python 3.5 from the official site, and I can now run the qmake straight. However, during the make I got: Server.o: In function `Server::~Server()': Server.cpp:(.text+0x1f): undefined reference to `Py_Finalize' Server.o: In function `Server::run()': Server.cpp:(.text+0x1b5): undefined reference to `PyRun_SimpleStringFlags' Server.cpp:(.text+0x241): undefined reference to `PyFile_FromFd' Server.cpp:(.text+0x292): undefined reference to `PyObject_AsFileDescriptor' Server.cpp:(.text+0x2ad): undefined reference to `PyRun_SimpleFileExFlags' Server.o: In function `Server::Server(unsigned short)': Server.cpp:(.text+0x60d): undefined reference to `Py_NoSiteFlag' Server.cpp:(.text+0x696): undefined reference to `Py_SetProgramName' Server.cpp:(.text+0x69b): undefined reference to `Py_Initialize' Server.cpp:(.text+0x785): undefined reference to `PySys_GetObject' Server.cpp:(.text+0x7fb): undefined reference to `PyBytes_FromString' Server.cpp:(.text+0x806): undefined reference to `PyList_Append' collect2: error: ld returned 1 exit status Makefile:124: recipe for target 'pgAdmin4' failed make: *** [pgAdmin4] Error 1 and then I'm stucked. Luca
On Mon, Apr 18, 2016 at 10:27 AM, Mark Csaba <markcs@gwyll.eu> wrote: > Hello Luca, > > Try using apt-file: > > sudo apt-get install apt-file > sudo apt-file update > sudo apt-file search python-config Thanks for the hint: that lead me to package python-dev. However, during the building I got: Server.o: In function `Server::~Server()': Server.cpp:(.text+0x1f): undefined reference to `Py_Finalize' Server.o: In function `Server::run()': Server.cpp:(.text+0x1bb): undefined reference to `PyRun_SimpleStringFlags' Server.cpp:(.text+0x231): undefined reference to `PyFile_FromString' Server.cpp:(.text+0x282): undefined reference to `PyFile_AsFile' Server.cpp:(.text+0x291): undefined reference to `PyRun_SimpleFileExFlags' Server.o: In function `Server::Server(unsigned short)': Server.cpp:(.text+0x62d): undefined reference to `Py_NoSiteFlag' Server.cpp:(.text+0x661): undefined reference to `Py_SetProgramName' Server.cpp:(.text+0x67f): undefined reference to `Py_Initialize' Server.cpp:(.text+0x769): undefined reference to `PySys_GetObject' Server.cpp:(.text+0x7e3): undefined reference to `PyString_FromString' Server.cpp:(.text+0x7ee): undefined reference to `PyList_Append' collect2: error: ld returned 1 exit status Makefile:124: recipe for target 'pgAdmin4' failed make: *** [pgAdmin4] Error 1 Luca
Hi,
This error will come due to library file linking preference in Makefile.
Python library should be linked at the end so you have to change the Makefile as below.
By default, python library "-lpython3.4m" is linked with "LFLAGS" in Makefile.
Solution:-
Remove the "-lpython3.4m" from LFLAGS in Makefile and add it at the end in "LIBS" variable after linking of Qt libraries as below.
LIBS = $(SUBLIBS) -lQt5WebKitWidgets -L/usr/lib/i386-linux-gnu -lQt5Quick -lQt5OpenGL -lQt5PrintSupport -lQt5WebKit -lQt5Qml -lQt5Location -lQt5Widgets -lQt5Network -lQt5Positioning -lQt5Sensors -lQt5Gui -lQt5Core -lGL -lpthread -lpython3.4m
Hope, it will solve your issue.
Let us know if you still face the same issue.
Thanks,
Neel Patel
On Tue, Apr 19, 2016 at 2:16 PM, Luca Ferrari <fluca1978@infinito.it> wrote:
On Mon, Apr 18, 2016 at 12:29 AM, Darren Duncan <darren@darrenduncan.net> wrote:
> Akin to Dave's response, perhaps your problem is that the installed python
> package is only complete if you are just running pure Python code against
> it, whereas if you are building anything C-level against Python eg some kind
> of extension then you would need a python-devel like package to give you the
> relevant C header files which you otherwise don't have. -- Darren Duncan
I've installed python 3.5 from the official site, and I can now run
the qmake straight. However, during the make I got:
Server.o: In function `Server::~Server()':
Server.cpp:(.text+0x1f): undefined reference to `Py_Finalize'
Server.o: In function `Server::run()':
Server.cpp:(.text+0x1b5): undefined reference to `PyRun_SimpleStringFlags'
Server.cpp:(.text+0x241): undefined reference to `PyFile_FromFd'
Server.cpp:(.text+0x292): undefined reference to `PyObject_AsFileDescriptor'
Server.cpp:(.text+0x2ad): undefined reference to `PyRun_SimpleFileExFlags'
Server.o: In function `Server::Server(unsigned short)':
Server.cpp:(.text+0x60d): undefined reference to `Py_NoSiteFlag'
Server.cpp:(.text+0x696): undefined reference to `Py_SetProgramName'
Server.cpp:(.text+0x69b): undefined reference to `Py_Initialize'
Server.cpp:(.text+0x785): undefined reference to `PySys_GetObject'
Server.cpp:(.text+0x7fb): undefined reference to `PyBytes_FromString'
Server.cpp:(.text+0x806): undefined reference to `PyList_Append'
collect2: error: ld returned 1 exit status
Makefile:124: recipe for target 'pgAdmin4' failed
make: *** [pgAdmin4] Error 1
and then I'm stucked.
Luca
--
Sent via pgadmin-support mailing list (pgadmin-support@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-support
On Tue, Apr 19, 2016 at 11:00 AM, Neel Patel <neel.patel@enterprisedb.com> wrote: > Remove the "-lpython3.4m" from LFLAGS in Makefile and add it at the end in > "LIBS" variable after linking of Qt libraries as below. While it compiles with python 2.7 it does not with 3.5.1 (I report this in the case it is useful): In file included from qrc_pgAdmin4.cpp:9:0: qrc_pgAdmin4.cpp:2373:44: warning: ‘qInitResources_pgAdmin4__init_variable__’ defined but not used [-Wunused-variable]Q_CONSTRUCTOR_FUNCTION(QT_MANGLE_NAMESPACE(qInitResources_pgAdmin4)) ^ /usr/include/qt4/QtCore/qglobal.h:941:21: note: in definition of macro ‘Q_CONSTRUCTOR_FUNCTION0’ static const int AFUNC ## __init_variable__ = AFUNC(); ^ qrc_pgAdmin4.cpp:2373:1: note: in expansion of macro ‘Q_CONSTRUCTOR_FUNCTION’Q_CONSTRUCTOR_FUNCTION(QT_MANGLE_NAMESPACE(qInitResources_pgAdmin4))^ qrc_pgAdmin4.cpp:2373:24: note: in expansion of macro ‘QT_MANGLE_NAMESPACE’Q_CONSTRUCTOR_FUNCTION(QT_MANGLE_NAMESPACE(qInitResources_pgAdmin4)) ^ g++ -m64 -L/usr/local/Python-3.5.1/lib/python3.5/config-3.5m -L/usr/local/Python-3.5.1/lib -lpthread -ldl -lutil -lm -Xlinker -export-dynamic -Wl,-O1 -o pgAdmin4 pgAdmin4.o BrowserWindow.o Server.o TabWindow.o WebViewWindow.o ConfigWindow.o moc_BrowserWindow.o moc_Server.o moc_TabWindow.o moc_WebViewWindow.o moc_ConfigWindow.o qrc_pgAdmin4.o -L/usr/lib/x86_64-linux-gnu -lQtWebKit -lQtGui -lQtNetwork -lQtCore -lpthread -lpython3.5m /usr/bin/ld: /usr/local/Python-3.5.1/lib/python3.5/config-3.5m/libpython3.5m.a(signalmodule.o): undefined reference to symbol 'pthread_sigmask@@GLIBC_2.2.5' /lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status Makefile:124: recipe for target 'pgAdmin4' failed make: *** [pgAdmin4] Error 1
Hello, I'm not an expert on this, but I would start with this line: "undefined reference to symbol 'pthread_sigmask@@GLIBC_2.2.5'" Csaba -----Original Message----- From: pgadmin-support-owner@postgresql.org [mailto:pgadmin-support-owner@postgresql.org] On Behalf Of Luca Ferrari Sent: Tuesday, April 19, 2016 12:05 PM To: Neel Patel Cc: pgadmin-support@postgresql.org Subject: Re: [pgadmin-support] pgadmin4: The python-config executable could not be found. On Tue, Apr 19, 2016 at 11:00 AM, Neel Patel <neel.patel@enterprisedb.com> wrote: > Remove the "-lpython3.4m" from LFLAGS in Makefile and add it at the > end in "LIBS" variable after linking of Qt libraries as below. While it compiles with python 2.7 it does not with 3.5.1 (I report this in the case it is useful): In file included from qrc_pgAdmin4.cpp:9:0: qrc_pgAdmin4.cpp:2373:44: warning: ‘qInitResources_pgAdmin4__init_variable__’ defined but not used [-Wunused-variable] Q_CONSTRUCTOR_FUNCTION(QT_MANGLE_NAMESPACE(qInitResources_pgAdmin4)) ^ /usr/include/qt4/QtCore/qglobal.h:941:21: note: in definition of macro ‘Q_CONSTRUCTOR_FUNCTION0’ static const int AFUNC ## __init_variable__ = AFUNC(); ^ qrc_pgAdmin4.cpp:2373:1: note: in expansion of macro ‘Q_CONSTRUCTOR_FUNCTION’ Q_CONSTRUCTOR_FUNCTION(QT_MANGLE_NAMESPACE(qInitResources_pgAdmin4)) ^ qrc_pgAdmin4.cpp:2373:24: note: in expansion of macro ‘QT_MANGLE_NAMESPACE’ Q_CONSTRUCTOR_FUNCTION(QT_MANGLE_NAMESPACE(qInitResources_pgAdmin4)) ^ g++ -m64 -L/usr/local/Python-3.5.1/lib/python3.5/config-3.5m -L/usr/local/Python-3.5.1/lib -lpthread -ldl -lutil -lm -Xlinker -export-dynamic -Wl,-O1 -o pgAdmin4 pgAdmin4.o BrowserWindow.oServer.o TabWindow.o WebViewWindow.o ConfigWindow.o moc_BrowserWindow.o moc_Server.o moc_TabWindow.o moc_WebViewWindow.o moc_ConfigWindow.o qrc_pgAdmin4.o -L/usr/lib/x86_64-linux-gnu -lQtWebKit -lQtGui -lQtNetwork -lQtCore -lpthread -lpython3.5m /usr/bin/ld: /usr/local/Python-3.5.1/lib/python3.5/config-3.5m/libpython3.5m.a(signalmodule.o): undefined reference to symbol 'pthread_sigmask@@GLIBC_2.2.5' /lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status Makefile:124: recipe for target 'pgAdmin4' failed make: *** [pgAdmin4] Error 1 -- Sent via pgadmin-support mailing list (pgadmin-support@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-support