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

ImportError: No module named numpy #394

Closed
romdos opened this issue Aug 6, 2016 · 2 comments
Closed

ImportError: No module named numpy #394

romdos opened this issue Aug 6, 2016 · 2 comments
Labels

Comments

@romdos
Copy link

romdos commented Aug 6, 2016

Hello everyone! I have the next trouble:
when I run rqt_bag bag-file
I get the next error:
RosPluginProvider.load(rqt_bag_plugins/BagPlotPlugin) exception raised in builtin.import(rqt_bag_plugins.plot_plugin, [PlotPlugin]):
Traceback (most recent call last):
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_gui/ros_plugin_provider.py", line 77, in load
module = builtin.import(attributes['module_name'], fromlist=[attributes['class_from_class_type']], level=0)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_bag_plugins/plot_plugin.py", line 35, in
from .plot_view import PlotView
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_bag_plugins/plot_view.py", line 77, in
from rqt_plot.data_plot import DataPlot
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_plot/data_plot/init.py", line 34, in
import numpy
ImportError: No module named numpy

How can I fix it? I tried pip install numpy but no luck. Any help!

@romdos
Copy link
Author

romdos commented Aug 6, 2016

sudo pip install numpy solved this issue

@dirk-thomas dirk-thomas added the bug label Aug 8, 2016
@dirk-thomas
Copy link
Contributor

dirk-thomas commented Aug 8, 2016

Thanks for the report. It looks like that numpy was added in #239 but the dependency was not declared in the manifest. I created #396 to fix that.

In general you should not install dependencies using pip but via apt instead (in this case python-numpy). Simply because your apt packages can be updated as part of a declared dependency and the pip packages won't get updated and even overlay a potentially newer version installed from Debian packages. So using pip package is asking for trouble in the future.

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

No branches or pull requests

2 participants