# Mininet Integration with a P4-enabled switch

**URL:** https://forum.p4.org/t/mininet-integration-with-a-p4-enabled-switch/883
**Category:** P4 Dev
**Created:** [July 6, 2023, 9:13am UTC](https://forum.p4.org/t/mininet-integration-with-a-p4-enabled-switch/883 "2023-07-06T09:13:03Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Lorenzom](https://avatars.discourse-cdn.com/v4/letter/l/e495f1/32.png) [@Lorenzom](https://forum.p4.org/u/Lorenzom)
#### Post date: [July 6, 2023, 9:13am UTC](https://forum.p4.org/t/mininet-integration-with-a-p4-enabled-switch/883/1 "2023-07-06T09:13:03Z")

</div>

Hello everyone.  
I am new to P4 and I wanted to ask you a question. I recently been stucked with trying to create a default mininet python script with a p4 enabled-switch instead of the mininet OVSswitch.I have tried to replace with the simple\_switch, psaswitch, and other p4 switches however I continuosly get same error. The error I get is “ImportError: cannot import name 'SimpleSwitch from …”. What am I doing wrong, and am I able to do this or do I need to carry out a different process? I simply want to runa mininet script with a p4 enabled switch and run my p4 file or json file the p4 switch CLI.  
I would strongly appreciate your help.

 ![WhatsApp Image 2023-07-05 at 16.13.01](https://us1.discourse-cdn.com/flex019/uploads/p4/original/1X/79ce712e36fa57d0cd004a3a05940ab0d2367820.jpeg)

I provided my script as well so you can have a look if you want.

---

<div class="post-metadata">

### Author: ![ederollora](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.p4.org/ederollora/32/21_2.png) [@ederollora](https://forum.p4.org/u/ederollora)
#### Post date: [July 6, 2023, 10:08am UTC](https://forum.p4.org/t/mininet-integration-with-a-p4-enabled-switch/883/2 "2023-07-06T10:08:44Z")

</div>

Hi,

Is this your own environment (you install your own tools) or did you get the VM from the official repository ([tutorials](https://github.com/p4lang/tutorials))?

Also, do you mind making a capture of the error? I think you “cut” the important part (i believe). You can also copy-paste, of course.

Cheers,
