ImportError: No module named wx
Hi all,
When launching the node "jointstatepublisher" , 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
Asked by Ruud on 2015-07-07 05:00:12 UTC
Answers
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/220546/catkin_make-failure-due-to-python-anaconda/
then I can simulate 7-dof-robot from the book. Mastering ROS robotics. cheers.
Asked by schwarmcyc on 2016-08-14 14:27:37 UTC
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 tryimport wx
?Asked by gvdhoorn on 2015-07-07 06:05:22 UTC
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 "", line 1, in
ImportError: No module named wx
Asked by Ruud on 2015-07-07 08:34:58 UTC
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.
Asked by gvdhoorn on 2015-07-07 10:37:27 UTC
@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.
Asked by Ruud on 2015-07-09 03:24:16 UTC
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
import wx
ImportError: No module named wx
Asked by tengfei on 2017-10-25 05:18:44 UTC
I installed a tool to manage different version of python named pyenv. I don't know whether this result in the problem.
Asked by tengfei on 2017-10-25 05:48:32 UTC