Ask Your Question
0

ImportError: No module named wx

asked 2015-07-07 05:00:12 -0500

Ruud gravatar image

updated 2015-07-07 08:32:58 -0500

Hi all,

When launching the node "joint_state_publisher" , I get the following error:

Traceback (most recent call last): File "/opt/ros/indigo/lib/joint_state_publisher/joint_state_publisher", line 5, in <module>import wx ImportError: No module named wx

I had a similar problem not long ago with a different module: see my question here

I think it has something to do with my python installation, however I have no idea how to check if this is installed correctly.

Best, Ruud

edit retag flag offensive close merge delete

Comments

Python nodes are not compiled, so I'm confused about your description of your issue. Could you elaborate a bit? What is the output if you start python in a shell, then try import wx?

gvdhoorn gravatar image gvdhoorn  ( 2015-07-07 06:05:22 -0500 )edit

Of course! It cannot find the module.

Python 2.7.10 |Anaconda 2.2.0 (64-bit)| (default, May 28 2015, 17:02:03) [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2

import wx Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named wx

Ruud gravatar image Ruud  ( 2015-07-07 08:34:58 -0500 )edit

This is a from-source install on redhat? Please include relevant info in your OP. OS, version, how you installed, which tutorials you follows - if any, etc.

gvdhoorn gravatar image gvdhoorn  ( 2015-07-07 10:37:27 -0500 )edit

@gvdhoorn, thank you for your input. Currently I get a different compilation error, I will remove my question until I can provide a clear overview of what is going on.

Ruud gravatar image Ruud  ( 2015-07-09 03:24:16 -0500 )edit

I have met the same question when I rosrun the joint_state_publisher.Traceback here is the output (most recent call last): File "/opt/ros/indigo/lib/joint_state_publisher/joint_state_publisher", line 5, in <module> import wx ImportError: No module named wx

tengfei gravatar image tengfei  ( 2017-10-25 05:18:44 -0500 )edit

I installed a tool to manage different version of python named pyenv. I don't know whether this result in the problem.

tengfei gravatar image tengfei  ( 2017-10-25 05:48:32 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-08-14 14:27:37 -0500

schwarmcyc gravatar image

Hi I face with the same proble because of Python Anaconda can you type python --version to check? you need to

step1. uncomment export PATH="/home/<your user>/anaconda3/bin:$PATH" in your ~/.bashrc

step2. $rm -r ~/catkin_ws/build

step3. catkin_make again

Delete your build folder after turning off anaconda. CMake will cache the Python executable it finds.

http://answers.ros.org/question/22054...

then I can simulate 7-dof-robot from the book. Mastering ROS robotics. cheers.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-07-07 05:00:12 -0500

Seen: 1,159 times

Last updated: Aug 14 '16