Ubuntu下搭建ryu环境

时间:2022-11-06 14:43:36

RYU环境搭建总共四步:

step1:首先下载相应的python套件,并且更新pip

$ sudo apt-get install python-pip python-dev build-essential

$ sudo pip install --upgrade pip

step2:安装RYU相关套件

$ sudo apt-get install python-eventlet

$ sudo apt-get install python-routes

$ sudo apt-get install python-paramiko

$ sudo apt-get install python-webob

step3:安装RYU,有两种方案,推荐第一种,

<1>使用pip安装RYU    $ sudo pip install ryu

<2>使用git下载ryu源码安装

$ git clone git://github.com/osrg/ryu.git

$  cd ryu

$ sudo python setup.py install

step4:安装RYU基本完成,运行ryu-manager出现如下两种情况,<1>说明安装成功

<1>出现: loading app ryu.controller.ofp_handler

instantiating app ryu.controller.ofp_handler of OFPHandler

<2>Traceback (most recent call last):

……

dists = vs.resolve(reqs,Enviroment())

File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 632 in resolve

raise VersionConflict(dist,req) # XXX put more info here

pkg_resources.VersionConflict:(six 1.5.2 (/usr/lib/python2.7/dist-packages), Requirement.parse('six>=1.9.0'))

这一问题说明pip版本不匹配,解决方案如下:

$ sudo apt-get remove python-pip

$ wget https://raw.github.com/pypa/pip/master/contrib/get-pip.py

$ pip install --upgrade six