Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ros2bag-convert ModuleNotFoundError #10

Open
benjinne opened this issue Mar 13, 2024 · 1 comment
Open

ros2bag-convert ModuleNotFoundError #10

benjinne opened this issue Mar 13, 2024 · 1 comment

Comments

@benjinne
Copy link

When running the command I keep getting:

Traceback (most recent call last):
  File "/usr/local/bin/ros2bag-convert", line 5, in <module>
    from ros2bag_convert.main import main
ModuleNotFoundError: No module named 'ros2bag_convert.main'

The executable exists under /usr/local/bin and it successfully installed with sudo pip install ros2bag-convert

sudo pip3 install ros2bag_convert
Collecting ros2bag_convert
  Using cached ros2bag_convert-0.1.0-py3-none-any.whl (9.9 kB)
Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from ros2bag_convert) (59.6.0)
Installing collected packages: ros2bag_convert
Successfully installed ros2bag_convert-0.1.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

Does anyone have any suggestions?

@HYD-PG
Copy link

HYD-PG commented Mar 21, 2024

It is possible that your ros2bag_convert is empty, you can go into usr/local/bin to see if the attribute is 0. This situation may be caused by the network, you can re-download it in a better network conditions

sudo pip uninstall ros2bag_convert
sudo pip install ros2bag_convert

Of course, if you still encounter similar alarm errors, you can choose to set up a virtual environment, but you will need to re-download the relevant modules for python3 in order to get ros2bag_convert to run, though it is more cumbersome:

python3 -m venv myenv
source myenv/bin/activate
pip install ros2bag_convert
deactivate

The cost of this is that you may need to re-download modules such as numpy in your virtual environment. This is just a related situation I encountered, I uninstalled and reinstalled and it solved it, hope this helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants