I installed ROS from source on Slackware Linux. However for most of the packages it generated python modules with the same name in both `~/ros_catkin_ws/install_isolated/lib/python2.7/site-packages` and `~/ros_catkin_ws/install_isolated/lib64/python2.7/site-packages`. This is a problem because this creates name clashes and causes import errors. For example, currently these are some of the actionlib modules:
```
~/ros_catkin_ws/install_isolated/lib64/python2.7/site-packages/actionlib/__init__.py
~/ros_catkin_ws/install_isolated/lib64/python2.7/site-packages/actionlib/exceptions.py
~/ros_catkin_ws/install_isolated/lib/python2.7/site-packages/actionlib/msg/__init__.py
```
My `$PYTHONPATH` includes both
```
~/ros_catkin_ws/install_isolated/lib64/python2.7/site-packages
~/ros_catkin_ws/install_isolated/lib/python2.7/site-packages
```
However, because of the name clash of the actionlib module, python only finds the module under the `lib64` directory and the one under `lib` is ignored. Thus `import actionlib.execptions` works ok, but `import actionlib.msg` fails. When I paste the `msg` directory in the same directory as `exceptions.py`, everything works fine.
There are other modules which have the same problem. Why does ROS split the modules in such a way and how can I fix this? To my knowledge, python does not work like that and it does not expect the same module to be in both `lib` and `lib64`. For comparison, building from source on Ubuntu Xenial on a 64-bit VM placed everything under `lib`.
↧