ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Dear reader,
In Ubuntu 20.04 with ROS Noetic it showed

em: error: couldn't find "__main__" module in /usr/local/lib/python3.8/dist-packages/em.

I tried renaming __init__.py in that location to __main__.py, and other answers, none worked.

The only workaround that successfully worked was:
Copy the file named em.py in the /usr/local/lib/python3.8/dist-packages directory and paste in the above em directory with name __main__.py

sudo cp -T /usr/local/lib/python3.8/dist-packages/em.py /usr/local/lib/python3.8/dist-packages/em/__main__.py

I've uploaded my em directory for reference here: /usr/local/lib/python3.8/dist-packages/em

Note: Your em module may be installed somewhere else, in which case find the directory from the catkin_make error or run python3 -m pip show em or accordingly.

Dear reader,
In Ubuntu 20.04 with ROS Noetic it showed

em: error: couldn't find "__main__" module in /usr/local/lib/python3.8/dist-packages/em.

/usr/local/lib/python3.8/dist-packages/em.

I tried renaming __init__.py in that location to __main__.py, and other answers, none worked.

The only workaround that successfully worked was:
Copy the file named em.py in the /usr/local/lib/python3.8/dist-packages directory and paste in the above em directory with name __main__.py

sudo cp -T /usr/local/lib/python3.8/dist-packages/em.py /usr/local/lib/python3.8/dist-packages/em/__main__.py

I've uploaded my em directory for reference here: /usr/local/lib/python3.8/dist-packages/em

Note: Your em module may be installed somewhere else, in which case find the directory from the catkin_make error or run python3 -m pip show em or accordingly.

-Himanshu