problem in installing PyViz in NS3 on OS X10.11

1,385 views
Skip to first unread message

杨畅

unread,
Nov 6, 2015, 3:42:21 AM11/6/15
to ns-3-users
HI,All
I'm new to NS3, and I followed the ns-3-tutorial to install the NS3(ns-allinone-3.24 ).  Everything works well except the PyViz part. Then I followed the steps in (https://www.nsnam.org/wiki/index.php/PyViz) to install additional packages(i.e pygtk, pygoocanvas, and pygraphviz packages) to enable PyViz.  The following command was suggested(for OS X)
    port install py27-pygtk py27-pygoocanvas py27-pygraphviz
however, the py27-pygoocanvas was inaccessible,so I used py-goocanvas instead.
when I finished installing these packages and build the NS-3 tree again, it still says that Missing python modules: gtk, goocanvas, pygraphviz)
what should I do?

p.s 
1.I searched some similar problem in the group but none of them ran into the same problem as i did.
2.I tried fink to install those packages successfully, and sadly, it still doesn't work 
3.I tried to install the NS3 on ubuntu today and the PyViz works, it really confuses me... did i miss some packages?(i followed the first 3 steps in https://www.nsnam.org/wiki/index.php/HOWTO_get_ns-3_running_on_Mac_OS_X_(10.6.2_Intel) to install the prerequisites)
4.Here are the configuration info:

yangchangdeMacBook-Pro:ns-3.24.1 yangchang$ ./waf configure --enable-tests --enable-examples

Setting top to                           : /Users/yangchang/Documents/eclipseworkspace/ns3/ns-3.24.1 

Setting out to                           : /Users/yangchang/Documents/eclipseworkspace/ns3/ns-3.24.1/build 

Checking for 'clang' (C compiler)        : /usr/bin/clang 

Checking for cc version                  : 7.0.0 

Checking for 'clang++' (C++ compiler)    : /usr/bin/clang++ 

Checking for program 'python'            : /usr/bin/python 

Checking for python version              : (2, 7, 10, 'final', 0) 

python-config                            : /usr/bin/python-config 

Asking python-config for pyembed '--cflags --libs --ldflags' flags : yes 

Getting pyembed flags from python-config                           : yes 

Asking python-config for pyext '--cflags --libs --ldflags' flags   : yes 

Getting pyext flags from python-config                             : yes 

Checking for compilation flag -Wno-array-bounds support            : ok 

Checking for pybindgen location                                    : ../pybindgen-0.17.0.post41+ngd10fa60 (guessed) 

Checking for python module 'pybindgen'                             : 0.17.0.post41+ngd10fa60 

Checking for pybindgen version                                     : 0.17.0.post41+ngd10fa60 

Checking for code snippet                                          : no 

Checking for types uint64_t and unsigned long equivalence          : yes 

Checking for code snippet                                          : yes 

Checking for types uint64_t and unsigned long long equivalence     : no 

Checking for the apidefs that can be used for Python bindings      : gcc-ILP32 

Checking for internal GCC cxxabi                                   : incomplete 

Checking for python module 'pygccxml'                              : not found 

Checking boost includes                                            : 1_59 

Checking boost libs                                                : ok 

Checking for boost linkage                                         : ok 

Checking for click location                                        : not found 

Checking for program 'pkg-config'                                  : /sw/bin/pkg-config 

Checking for 'gtk+-2.0' >= 2.12                                    : yes 

Checking for 'libxml-2.0' >= 2.7                                   : not found 

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                                            : not found 

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                                 : not found 

Checking for header netpacket/packet.h                             : not found 

Checking for NSC location                                          : not found 

Checking for OpenFlow location                                     : not found 

Checking for 'sqlite3'                                             : not found 

Checking for header linux/if_tun.h                                 : not found 

Checking for python module 'gtk'                                   : not found 

Checking for python module 'goocanvas'                             : not found 

Checking for python module 'pygraphviz'                            : not found 

Checking for program 'sudo'                                        : /usr/bin/sudo 

Checking for program 'valgrind'                                    : not found 

Checking for 'gsl'                                                 : not found 

Checking for program 'doxygen'                                     : not found 

---- Summary of optional NS-3 features:

Build profile                 : debug

Build directory               : 

Python Bindings               : enabled

Python API Scanning Support   : not enabled (Missing 'pygccxml' Python module)

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                         : not enabled (library 'libxml-2.0 >= 2.7' not found)

Threading Primitives          : enabled

Real Time Simulator           : not enabled (librt is not available)

File descriptor NetDevice     : enabled

Tap FdNetDevice               : not enabled (needs linux/if_tun.h)

Emulation FdNetDevice         : not enabled (needs netpacket/packet.h)

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 (OpenFlow not enabled (see option --with-openflow))

SQlite stats data output      : not enabled (library 'sqlite3' not found)

Tap Bridge                    : not enabled (<linux/if_tun.h> include not detected)

PyViz visualizer              : not enabled (Missing python modules: gtk, goocanvas, pygraphviz)

Use sudo to set suid bit      : not enabled (option --enable-sudo not selected)

Build tests                   : enabled

Build examples                : enabled

GNU Scientific Library (GSL)  : not enabled (GSL not found)

'configure' finished successfully (2.529s)

Tommaso Pecorella

unread,
Nov 6, 2015, 7:45:57 AM11/6/15
to ns-3-users
Hi,

I never tested it (I'm not a Python fan and I use NetAnim to visualize my network), but I can do a best guess.
Waf found the standard Python here (/usr/bin/python is the Apple path), and you installed the python libraries using MacPorts.
Most probably you'll need to configure Python to point to the MacPort-based Python, or it will not see what you installed.

I hope it works, but I can't guarantee anything.

T.

杨畅

unread,
Nov 8, 2015, 9:08:28 PM11/8/15
to ns-3-users
You are right, when I use "port select python" command and select the right version of Python, it works. Thank you sooooooo much

在 2015年11月6日星期五 UTC+8下午8:45:57,Tommaso Pecorella写道:
Reply all
Reply to author
Forward
0 new messages