Can't make ns-3 to enable python

1,683 views
Skip to first unread message

ryokuSennin

unread,
Apr 22, 2014, 5:58:16 AM4/22/14
to ns-3-...@googlegroups.com
Hey there!

I am pretty new to ns-3.
Well yesterday I tried to enable python in my ns-3.
Setting top to                           : /home/yassine/repos/ns-3-allinone/ns-3-dev
Setting out to                           : /home/yassine/repos/ns-3-allinone/ns-3-dev/build
Checking for 'gcc' (c compiler)          : /usr/bin/gcc
Checking for cc version                  : 4.8.1
Checking for 'g++' (c++ compiler)        : /usr/bin/g++
Checking for compilation flag -Wl,--soname=foo... support : ok
Checking for program python                               : /usr/local/bin/python
Checking for python version                               : (2, 7, 6, 'final', 0)
Checking for library python2.7 in LIBDIR                  : yes
Checking for program /usr/local/bin/python-config,python2.7-config,python-config-2.7,python2.7m-config : /usr/local/bin/python-config
Checking for header Python.h                                                                           : :-(
Asking python-config for pyembed --cflags flags                                                        : yes
Asking python-config for pyembed --libs flags                                                          : yes
Asking python-config for pyembed --ldflags flags                                                       : yes
Getting pyembed flags from python-config                                                               : yes
Asking python-config for pyext --cflags flags                                                          : yes
Asking python-config for pyext --libs flags                                                            : yes
Asking python-config for pyext --ldflags flags                                                         : yes
Getting pyext flags from python-config                                                                 : Could not build python extensions
Checking boost includes                                                                                : 1_53
Checking boost libs                                                                                    : not found
Checking boost includes                                                                                : 1_53
Checking boost libs                                                                                    : not found
Checking for click location                                                                            : not found
Checking for program pkg-config                                                                        : /usr/bin/pkg-config
Checking for 'gtk+-2.0' >= 2.12                                                                        : yes
Checking for 'libxml-2.0' >= 2.7                                                                       : yes
Checking for type uint128_t                                                                            : not found
Checking for type __uint128_t                                                                          : yes
Checking high precision implementation                                                                 : 128-bit integer (default)
Checking for header stdint.h                                                                           : yes
Checking for header inttypes.h                                                                         : yes
Checking for header sys/inttypes.h                                                                     : not found
Checking for header sys/types.h                                                                        : yes
Checking for header sys/stat.h                                                                         : yes
Checking for header dirent.h                                                                           : yes
Checking for header stdlib.h                                                                           : yes
Checking for header signal.h                                                                           : yes
Checking for header pthread.h                                                                          : yes
Checking for header stdint.h                                                                           : yes
Checking for header inttypes.h                                                                         : yes
Checking for header sys/inttypes.h                                                                     : not found
Checking for library rt                                                                                : yes
Checking for header netpacket/packet.h                                                                 : yes
Checking for header sys/ioctl.h                                                                        : yes
Checking for header net/if.h                                                                           : yes
Checking for header net/ethernet.h                                                                     : yes
Checking for header linux/if_tun.h                                                                     : yes
Checking for header netpacket/packet.h                                                                 : yes
Checking for NSC location                                                                              : not found
Checking for 'sqlite3'                                                                                 : yes
Checking for header linux/if_tun.h                                                                     : yes
Checking for program sudo                                                                              : /usr/bin/sudo
Checking for program valgrind                                                                          : /usr/bin/valgrind
Checking for 'gsl'                                                                                     : yes
Checking for compilation flag -Wno-error=deprecated-d... support                                       : ok
Checking for compilation flag -Wno-error=deprecated-d... support                                       : ok
Checking for compilation flag -fstrict-aliasing... support                                             : ok
Checking for compilation flag -fstrict-aliasing... support                                             : ok
Checking for compilation flag -Wstrict-aliasing... support                                             : ok
Checking for compilation flag -Wstrict-aliasing... support                                             : ok
Checking for program doxygen                                                                           : /usr/bin/doxygen
---- Summary of optional NS-3 features:
Build profile                 : debug
Build directory               : /home/yassine/repos/ns-3-allinone/ns-3-dev/build
Python Bindings               : not enabled (Python library or headers missing)
BRITE Integration             : not enabled (BRITE not enabled (see option --with-brite))
NS
-3 Click Integration        : not enabled (nsclick not enabled (see option --with-nsclick))
GtkConfigStore                : enabled
XmlIo                         : enabled
Threading Primitives          : enabled
Real Time Simulator           : enabled
Emulated Net Device           : enabled
File descriptor NetDevice     : enabled
Tap FdNetDevice               : enabled
Emulation FdNetDevice         : enabled
PlanetLab FdNetDevice         : not enabled (PlanetLab operating system not detected (see option --force-planetlab))
Network Simulation Cradle     : not enabled (NSC not found (see option --with-nsc))
MPI
Support                   : not enabled (option --enable-mpi not selected)
NS
-3 OpenFlow Integration     : not enabled (Required boost libraries not found)
SQlite stats data output      : enabled
Tap Bridge                    : enabled
PyViz visualizer              : not enabled (Python Bindings are needed but not enabled)
Use sudo to set suid bit      : not enabled (option --enable-sudo not selected)
Build tests                   : not enabled (defaults to disabled)
Build examples                : not enabled (defaults to disabled)
GNU
Scientific Library (GSL)  : enabled


What I don't really get is why it does not find the python header. I installed python-dev, so it should be there, right? I just followed the tutorial.
I can run the c++ examples but I would prefer to enable pyhton, since I am much more familiar with python^^.
Something seems to be completely wrong with my installation.

Greets

Tommaso Pecorella

unread,
Apr 22, 2014, 2:20:52 PM4/22/14
to ns-3-...@googlegroups.com
Hi,

perhaps you forgot to install "python2.7-dev"

T.

...

ryokuSennin .

unread,
Apr 23, 2014, 9:03:17 AM4/23/14
to ns-3-...@googlegroups.com
Nope it is already installed. I then setup a VM on my windows boot and there it worked well. Maybe it has to do something with my version of Ubuntu. In the VM I use the 12.0 version of Ubuntu and on the latest version of ubuntu it did not work.
I will probably clean up my ubunutu partition and hopefully it will work then^^


--
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/fWAMieqDAG4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.

Tommaso Pecorella

unread,
Apr 23, 2014, 4:28:22 PM4/23/14
to ns-3-...@googlegroups.com
Hi,

it may be something related with Python3 and Python2. I know some support for Python3 is ongoing, but I don't use Python myself, so I don't know.

Mind if I ask which Ubuntu is failing on ? It's important for the 3.20 release.

Thanks,

T.

Tom Henderson

unread,
Apr 24, 2014, 10:20:26 AM4/24/14
to ns-3-...@googlegroups.com
On 04/23/2014 06:03 AM, ryokuSennin . wrote:
> Nope it is already installed. I then setup a VM on my windows boot and
> there it worked well. Maybe it has to do something with my version of
> Ubuntu. In the VM I use the 12.0 version of Ubuntu and on the latest
> version of ubuntu it did not work.
> I will probably clean up my ubunutu partition and hopefully it will work
> then^^

I was not able to reproduce your problem on the latest version of ubuntu
(14.04).

I just tried installing ns-allinone-3.19 on a virtual machine that had
no 'python-dev' package installed, only gcc/g++ and python. I get this
output from './waf configure':

Checking for program python : /usr/bin/python
Checking for python version : (2, 7, 6,
'final', 0)
Checking for library python2.7 in LIBDIR : not found
Checking for library python2.7 in python_LIBPL : yes
Checking for program
/usr/bin/python-config,python2.7-config,python-config-2.7,python2.7m-config
: not found
Checking for header Python.h
: :-(

...
---- Summary of optional NS-3 features:
Python Bindings : not enabled (Python library or headers
missing)


but after I install the package 'python-dev', I can enable the bindings:

Checking for program python : /usr/bin/python
Checking for python version : (2, 7, 6,
'final', 0)
Checking for library python2.7 in LIBDIR : yes
Checking for program
/usr/bin/python-config,python2.7-config,python-config-2.7,python2.7m-config
: /usr/bin/python-config
Checking for header Python.h
: yes

---- Summary of optional NS-3 features:
Python Bindings : enabled


I usually do not see the problem that you reported, so if you think it
is not a problem with your machine's installation of python, please give
us enough details to reproduce the problem (exactly which version of
Ubuntu, and which packages are installed, and the location on your
filesystem of the file Python.h).

- Tom

ryokuSennin .

unread,
Apr 30, 2014, 6:31:27 PM4/30/14
to ns-3-...@googlegroups.com
Sry guys for the late response! So for Tommaso: I had the Ubuntu 14.04 LTS, so the newest version. But I used python 2 not python 3. I can't tell you anymore about it because I deleted my ubuntu partition and made a new 12.10 where it now works.

As for Tom Henderson: I am sorry for the few details. Compared to you guys I am probably still newbie in Computer Science stuff so its not clear to me what additional details you would need.. I had installed all required packages listed in the wiki. And this output was the only thing i could think of being helpful for others to get my problem.

But as I said it works now fine;) So anyway, thanks for your efforst and if I can help further development with some more detailed information just let me know!



--
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/fWAMieqDAG4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages