简介:
Mininet是由一些虚拟的终端节点、交换机、路由器连接而成的一个网络仿真器,它采用轻量级的虚拟化技术使得系统可以和真实网络相媲美。
Mininet可以很方便地创建一个支持SDN的网络:host就像真实的电脑一样工作,可以使用ssh登录,启动应用程序,程序可以向以太网端口发送数据包,数据包会被交换机、路由器接收并处理。
有了这个网络,就可以灵活地为网络添加新的功能并进行相关测试,然后轻松部署到真实的硬件环境中。
安装:
安装环境:ubuntu-23.04-live-server-amd64
下载mininet
git clone https://github.com/mininet/mininet.git
没有git就安装:
sudo apt-get update
sudo apt-get install git
查看版本:
cd mininet
cat INSTALL|more
安装mininet
cd util/
./install.sh -a
使用
错误信息
报错信息:
error: externally-managed-environment
× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.
If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.
If you wish to install a non-Debian packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.
See /usr/share/doc/python3.11/README.venv for more information.
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
解决方案:
sudo apt install pipx
pipx install playsound
标签:mininet,venv,Python,网络,apt,environment,install,使用 From: https://www.cnblogs.com/xinbing/p/17517118.html