# Python import error: No module named em

**URL:** <https://discuss.px4.io/t/python-import-error-no-module-named-em/14190>\
**Category:** Uncategorized\
**Created:** [December 5, 2019, 8:27am UTC](https://discuss.px4.io/t/python-import-error-no-module-named-em/14190 "2019-12-05T08:27:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Look4Zombie](https://discuss.px4.io/letter_avatar_proxy/v4/letter/l/f14d63/32.png) [@Look4Zombie](https://discuss.px4.io/u/Look4Zombie)\
**Post date:** [December 5, 2019, 8:27am UTC](https://discuss.px4.io/t/python-import-error-no-module-named-em/14190/1 "2019-12-05T08:27:36Z")

</div>

Hi everyone, I am new to PX4 development and eager to learn. However, I am unable to install and run PX4 using the online tutorial on my MBP 2016 running OSX 10.15.1 (latest Catalina). After installing all the libraries and required toolchains, I get this error when trying to build the code using `make px4_sitl gazebo`:

* * *

python import error: No module named em

Required python packages not installed.

On a Debian/Ubuntu system please run:

sudo apt-get install python-empy  
sudo pip install catkin\_pkg

On MacOS please run:  
sudo pip install empy catkin\_pkg

On Windows please run:  
easy\_install empy catkin\_pkg

[10/731] Building CXX object src/lib/DriverFramework/framework/src/CMakeFiles/df\_driver\_framework.dir/WorkItems.cpp.o  
ninja: build stopped: subcommand failed.  
make: \*\*\* [px4\_sitl] Error 1

* * *

The problem is I already have these packages installed. If I run `sudo pip install empy catkin_pkg` I get the following:

* * *

Requirement already satisfied: empy in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (3.3.4)

Requirement already satisfied: catkin\_pkg in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (0.4.14)

Requirement already satisfied: docutils in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from catkin\_pkg) (0.15.2)

Requirement already satisfied: pyparsing in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from catkin\_pkg) (2.4.2)

Requirement already satisfied: python-dateutil in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from catkin\_pkg) (2.8.0)

Requirement already satisfied: six\>=1.5 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from python-dateutil-\>catkin\_pkg) (1.12.0)

* * *

I have experienced this error with yaml as well even though pyyaml is also installed.

Is there any way to fix this error?

---

<div class="post-metadata">

**Author:** ![pietropier](https://discuss.px4.io/letter_avatar_proxy/v4/letter/p/2bfe46/32.png) [@pietropier](https://discuss.px4.io/u/pietropier)\
**Post date:** [February 2, 2020, 3:24pm UTC](https://discuss.px4.io/t/python-import-error-no-module-named-em/14190/2 "2020-02-02T15:24:51Z")

</div>

I had a similar problem, and in my case it was due to conflicting namespaces between em and empy packages. I fixed the problem by uninstalling “em” and installing “empy”.

I hope this helps

---

<div class="post-metadata">

**Author:** ![ananyagupta](https://discuss.px4.io/user_avatar/discuss.px4.io/ananyagupta/32/5495_2.png) [@ananyagupta](https://discuss.px4.io/u/ananyagupta)\
**Post date:** [April 2, 2020, 6:13am UTC](https://discuss.px4.io/t/python-import-error-no-module-named-em/14190/3 "2020-04-02T06:13:34Z")

</div>

Hi, Look4Zombie & Pietropier thanks to both who shared the problem which I also faced and get the solution from here. After getting your reply I also uninstalling “em” and installing “empy” and able to work. Moreover, I also join online classes from CETPA Infotech from where I started to work on practically and analyses issues that can come.
