【发布时间】:2019-01-24 22:19:32
【问题描述】:
我在 VM 上有 Mininet,我使用 pip 安装了一个名为 wsproto 的包,但是当我尝试从 Mininet 主机内部使用该包时,我收到一个错误,指出该包丢失:
Traceback (most recent call last):
File "examples/http3_server.py", line 10, in <module>
import wsproto
ModuleNotFoundError: No module named 'wsproto'
事实证明,Mininet主机可用的包远远少于系统实际安装的包!
我的问题: 如何安装 Python 包并使其可用于 Mininet?
我在 Ubuntu 20.04 上运行,使用 Python 3.8.10:
$ whereis python3
python3: /usr/bin/python3.8-config /usr/bin/python3 /usr/bin/python3.8 /usr/lib/python3 /usr/lib/python3.8 /usr/lib/python3.9 /etc/python3 /etc/python3.8 /usr/local/lib/python3.8 /usr/include/python3.8 /usr/share/python3 /usr/share/man/man1/python3.1.gz
在 Mininet 上:
h1 whereis python3
python3: /usr/bin/python3.8-config /usr/bin/python3 /usr/bin/python3.8 /usr/lib/python3 /usr/lib/python3.8 /usr/lib/python3.9 /etc/python3 /etc/python3.8 /usr/local/lib/python3.8 /usr/include/python3.8 /usr/share/python3 /usr/share/man/man1/python3.1.gz
【问题讨论】: