Python3-dev not found by configure script

550 views
Skip to first unread message

Nicolas Østergaard

unread,
Sep 3, 2018, 9:34:56 AM9/3/18
to Biogeme
Hi all,

I'm trying to install Biogeme 2.5 with Pythonbiogeme on a fresh Ubuntu Server 18.04 LTS installation.
When running the configure script both with and without root, the python3-dev packages doesn't seem to be recognized.

The following is the result I get:

 biogeme 2.5 for linux-gnu:  Automatic configuration OK.
 Build biogeme............no (use option --enable-bison)
 Build biomerge...........no (use option --enable-bison)
 Build biosim.............no (use option --enable-bison)
 Build python biogeme.....no (Install python3-dev)
 Build GTK GUI version....no (use option --enable-gui)
 Static executables.......no (use option --enable-staticexec)
 Long double..............no (use option --enable-longdouble)
 Executables for debug....no (use option --enable-debug)
 Versioned installation...no (use option --enable-versioned)


However, I have installed the package and APT also confirms it:

root@ubuntu-box# apt install python3-dev python3.6-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3.6-dev is already the newest version (3.6.5-3).
python3-dev is already the newest version (3.6.5-3ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.


I have not messed around with any PPA, but I have tried looking in the configre script to see how it determines if python is installed... Without luck.

Any ideas I can try?

Michel Bierlaire

unread,
Sep 3, 2018, 3:54:35 PM9/3/18
to nicolasoe...@gmail.com, Michel Bierlaire, Biogeme
First, I’d suggest to install the latest version. http://biogeme.epfl.ch/distrib/biogeme-2.6a.tar.gz

To check if python is available, the configure procedure executes the following command:

python3 BIOGEMEDIR/pythonbiogeme/python/biogeme-python3-config.py headerdir

You may want to run it yourself to see what it returns. 

Often, it is an issue with the path that is not set correctly. 


--
You received this message because you are subscribed to the Google Groups "Biogeme" group.
To unsubscribe from this group and stop receiving emails from it, send an email to biogeme+u...@googlegroups.com.
To post to this group, send email to bio...@googlegroups.com.
Visit this group at https://groups.google.com/group/biogeme.
For more options, visit https://groups.google.com/d/optout.

Michel Bierlaire

unread,
Sep 7, 2018, 12:47:28 PM9/7/18
to Nicolas Østergaard, Michel Bierlaire, Biogeme
Very strange. You confirm that python3-dev is installed? 
Did you try the option --with-python-dir=DIR of the configure file? 
Specify the directory where Python.h is. Currently, it assumes that it is in /usr/include/python3.6m/Python.h
which is not the case, right? 

Michel




On 7 Sep 2018, at 12:57, Nicolas Østergaard <nicolasoe...@gmail.com> wrote:

Hi again Michel,

I have now tried a couple of things to successfully install Pythonbiogeme (2.6a), but the configure scripts does not find Python at all, no matter what.

I have tried:
Ubuntu Server 18.04
Ubuntu Server 16.04

Ubuntu MATE Desktop 18.04


When looking at the output from the script in Ubuntu 18.04, only for the Python part:
_____
checking for python3... /usr/bin/python3
checking /usr/include/python3.6m/Python.h usability... no
checking /usr/include/python3.6m/Python.h presence... no
checking for /usr/include/python3.6m/Python.h... no
_____
Build python biogeme.....no (Install python3-dev)
_____
When checking for the files with the file command:

user:box:file /usr/bin/python3
/usr/bin/python3: symbolic link to python3.6

user@box:file /usr/include/python3.6m/Python.h
/usr/include/python3.6m/Python.h: C source, ASCII text
_____
So the scripts does not seem to locate the file, even though it's there. The command you asked me to try (regard PATH$) still returns the correct python version, and python3-dev is installed.

The output is nearly the same on Ubuntu 16.04, just a different Python version. All the commands above returns the same, wether I invoke sudo or not, or become root first.

Do you have any ideas that I can try?

Med venlig hilsen
Nicolas Østergaard

2018-09-04 10:37 GMT+02:00 Nicolas Østergaard <nicolasoe...@gmail.com>:
Thanks for the quick reply.

The command returns the path for python3.6:
user@:ubuntu-box:~/Downloads sudo python3 biogeme-2.6a/pythonbiogeme/python/biogeme-python3-config.py headerdir
/usr/include/python3.6m

It does not make a difference wether I use the command with sudo or not, it still returns the above path, which - as far as I can see - is the correct path.

____

A dpkg-query returns the following:

user@ubuntu:box:~/Downloads$ dpkg-query -L python3
/.
/usr
/usr/bin
/usr/lib
/usr/lib/valgrind
/usr/lib/valgrind/python3.supp
/usr/share
/usr/share/doc
/usr/share/doc/python3
/usr/share/doc/python3/copyright
/usr/share/lintian
/usr/share/lintian/overrides
/usr/share/lintian/overrides/python3
/usr/share/man
/usr/share/man/man1
/usr/share/pixmaps
/usr/share/python3
/usr/share/python3/python.mk
/usr/share/python3/runtime.d
/usr/share/python3/runtime.d/public_modules.rtinstall
/usr/share/python3/runtime.d/public_modules.rtremove
/usr/bin/pdb3
/usr/bin/pydoc3
/usr/bin/pygettext3
/usr/share/doc/python3/README.Debian
/usr/share/doc/python3/changelog.Debian.gz
/usr/share/man/man1/pdb3.1.gz
/usr/share/man/man1/pydoc3.1.gz
/usr/share/man/man1/pygettext3.1.gz
/usr/share/pixmaps/python3.xpm
____

dpkg-query -L python3-dev
/.
/usr
/usr/bin
/usr/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/pkgconfig
/usr/share
/usr/share/doc
/usr/share/man
/usr/share/man/man1
/usr/bin/python3-config
/usr/bin/python3m-config
/usr/lib/x86_64-linux-gnu/pkgconfig/python3.pc
/usr/share/doc/python3-dev
/usr/share/man/man1/python3-config.1.gz
/usr/share/man/man1/python3m-config.1.gz
____

Any others things I can try?




Med venlig hilsen
Nicolas Østergaard

To unsubscribe from this group and stop receiving emails from it, send an email to biogeme+unsubscribe@googlegroups.com.

Michel Bierlaire

unread,
Sep 11, 2018, 6:37:35 AM9/11/18
to Nicolas Østergaard, Michel Bierlaire, Biogeme
Mystery solved! Thanks. Yes, indeed, make, g++ and the developments tools must be available. 

On 10 Sep 2018, at 09:25, Nicolas Østergaard <nicolasoe...@gmail.com> wrote:

Hi again Michel,

I finally figured out what the issue was:

1. For the script to find the Python.h file, the package "g++" needs to be installed first. This is not installed as default on Ubuntu.
2. The packages "make" and "build-essentials" needs to be installed before the make command can be issued succesfully.

Thanks for the support. :)



Med venlig hilsen
Nicolas Østergaard

2018-09-10 8:46 GMT+02:00 Nicolas Østergaard <nicolasoe...@gmail.com>:
1. I can confirm that python3-dev is installed:
______
root@box: apt install python3-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3-dev is already the newest version (3.6.5-3ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
______



2. I have also tried specifying the directory multiple times:
_____
./configure --with-python-dir=/usr/include/python3.6m/Python.h
--truncated--
checking for python3... no
Build python biogeme.....no (python3 not found in /usr/include/python3.6m/Python.h)
_____

I also tried a couple of other dirs, as I didn't know exactly what the script was looking for:
usr/include/python3.6m/
/usr/include/python3.6/
_____


3. I am not strong in Python, but the file it looks for exist:

root@box:/usr/include/python3.6m# ls Python*
Python-ast.h  Python.h

root@box: file /usr/include/python3.6m/Python.h
/usr/include/python3.6m/Python.h: C source, ASCII text

The permission for the Python.h file is the same as all the others in the same dir:
-rw-r--r-- 1 root root 2974 Apr  1 05:46 /usr/include/python3.6m/Python.h

Med venlig hilsen
Nicolas Østergaard

Reply all
Reply to author
Forward
0 new messages