0

Currently, I am working on the Ns3 simulator and now trying to enable the pyviz visualizer. According to the doc, I have downloaded the three dependencies which are

py27-pygtk
py27-pygoocanvas
py27-pygraphviz

Now in order to use this, I still need to enable the python bindings which I used /usr/bin/python2.7 ./waf configure wanna to check what needs for enabling python bindings. The result shows that

Python Bindings : not enabled (PyBindGen version not correct and newer version could not be retrieved)

So I checked the Doc and downloaded PyBindGen (version 0.18.0). The output shows

Installed /Library/Python/2.7/site-packages/PyBindGen-0.18.0-py2.7.egg Processing dependencies for PyBindGen==0.18.0 Finished processing dependencies for PyBindGen==0.18.0

After I ran the configuration check the results still showed that PyBindGen version not correct and newer version could not be retrieved So I presume that is that because I installed the wrong version of PyBindGen? If so how can I get the suitable version for enabling Python Binding?

I would appreciate if there is someone who can help me figure it out. Many thanks.

S.

li ki
  • 342
  • 3
  • 11
Shan Huang
  • 39
  • 1
  • 8
  • @ Konstantinos I m sorry to bother you again that I feel confused about this and now have no idea to figure it out. I found on [Google group](https://groups.google.com/forum/#!topic/ns-3-users/qPVUZpfUl9E) that there is a guy has the same problem as I do, just he wanted to install the ns3-dev while I am trying to use pyviz. Can I use his method? And also I am running it on Mac instead of a ubuntu, so I probably don't need to download the **python-gnome2** What do you say? – Shan Huang Jun 27 '17 at 13:10
  • If you download the ns-3-allinone it contains the PyBinGen for that release. – Konstantinos Jun 29 '17 at 10:10

2 Answers2

0

According to the Google Group

Here is the resolution(tested it worked):

follow the instruction hg clone http://code.nsnam.org/ns-3-allinone

cd ns-3-allinone && ./download.py

This will solve the Python Binding problem

Shan Huang
  • 39
  • 1
  • 8
0

Updated: after downloading this version of ns3. Solving the python binding problem. Then there will be another problem after running ./waf configure

it will show the result like this:

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

Even though I have installed all of the three dependencies. So after some researches I found that there has another questions post So there is a guy gave the guessing that

" 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."

So according to How to: Macports select python

here is the solution:

port select --list python

sudo port select --set python python27

Hope it will help anyone come afterwards to use this.

S.

Shan Huang
  • 39
  • 1
  • 8