Hi, Laura
When your specify the application by file name, trailing ".py" is
needed, so this should work:
ryu-manager --verbose ryu/ryu/app/example_switch_13*.py*
FYI, you can specify the application as a module, like:
ryu-manager --verbose ryu.app.example_switch_13*
*
Thanks,
Fujimoto
*
*
On 2017年08月29日 04:48, Laura Heath wrote:
Hello all!
I have been trying to work through the tutorial shown in the Ryu
github site, using a new Ubuntu 16.04.3 VM and trying to follow the
installation instructions given (including the optional-requires).
There have been a lot of problems with getting pip to install Ryu
correctly and to load all of the prerequisites, so I am suspicious
that there is something wrong with the configuration of the
ryu-manager. Right now, where I am at is at the first attempt to
execute the tutorial's example_switch_13 code. This fails with the
following error:
root@laura-XPS-8500:~# ryu-manager --verbose ryu/ryu/app/example_switch_13
lzma module is not available
Registered VCS backend: git
Registered VCS backend: hg
Registered VCS backend: svn
Registered VCS backend: bzr
loading app ryu/ryu/app/example_switch_13
Traceback (most recent call last):
File "/usr/local/bin/ryu-manager", line 11, in <module>
load_entry_point('ryu==4.16', 'console_scripts', 'ryu-manager')()
File
"/home/laura/.local/lib/python2.7/site-packages/ryu/cmd/manager.py",
line 98, in main
app_mgr.load_apps(app_lists)
File
"/home/laura/.local/lib/python2.7/site-packages/ryu/base/app_manager.py",
line 415, in load_apps
cls = self.load_app(app_cls_name)
File
"/home/laura/.local/lib/python2.7/site-packages/ryu/base/app_manager.py",
line 392, in load_app
mod = utils.import_module(name)
File "/home/laura/.local/lib/python2.7/site-packages/ryu/utils.py",
line 110, in import_module
return importlib.import_module(modname)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in
import_module
__import__(name)
ImportError: Import by filename is not supported.
Googling the error, I see that "import by filename" is not supported
by Python 2.7 (the native Python in Ubuntu for ages). So I'm not
clear where to go from here?
Thanks for your help,
Laura
PS: I resolved the "lzma module is not available" by running sudo
apt-get install python-lzma. Apparently Python 2.7 doesn't come with
an LZMA module native, and this was not included as a prerequisite
under pip installation or in the optional-requires. I'm not sure if
that was the "correct" version of LZMA to install or whether pyliblzma
was the "correct" one.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel