-3

I have Mininet on a VM, I installed a package called wsproto using pip, but when I try to use that package from inside a Mininet host I get an error indicating that the package is missing:

Traceback (most recent call last):
  File "examples/http3_server.py", line 10, in <module>
    import wsproto
ModuleNotFoundError: No module named 'wsproto'

It turns out that the packages available for the Mininet host are far less than the packages actually installed on the system!

My Question: How do I install a Python package and make it available for Mininet?

I am running on Ubuntu 20.04, using 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

and on 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
Hasan Aga
  • 718
  • 8
  • 27

2 Answers2

1

I figured out the solution, I had to use sudo like so:

sudo pip install wsproto
Hasan Aga
  • 718
  • 8
  • 27
0

You are trying to compare the string user.type with an unknown variable fetus , you should compare it with the string 'fetus' not with fetus

<div *ngIf="user.type=='fetus'">
Mohamed Ali RACHID
  • 3,245
  • 11
  • 22