First time here? Check out the FAQ!


ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

ImportError: No module named wx

asked May 5 '16

AsifA gravatar image

Hi. I am using husky_description and want to launch description.launch, which I was used to successfully launch in ROS Hydro at Ubuntu 12.04. Now I am using ROS Indigo on Ubuntu 14.04 and it shows me 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

[joint_state_publisher-3] process has died [pid 11298, exit code 1, cmd >/opt/ros/indigo/lib/joint_state_publisher/joint_state_publisher __name:=joint_state_publisher __log:=/home/asif/.ros/log/5bdd4b1c-130a-11e6-a55d-d4bed970caa5/joint_state_publisher-3.log]. log file: /home/asif/.ros/log/5bdd4b1c-130a-11e6-a55d-d4bed970caa5/joint_state_publisher-3*.log

I can not import wx in python shell as well (it shows the same ImportError). In another system (ROS Indigo, Ubuntu 14.04 and default installations of python2.7), it works fine. I have installed wxtools using sudo apt-get install python-wxtools. and the error is still there. Probably, the error is due to some additional python installations such as Anaconda 2.4.1 and SALOME. Any idea how to handle it? Thanks

Preview: (hide)

2 Answers

Sort by » oldest newest most voted
1

answered May 6 '16

ahendrix gravatar image

updated May 6 '16

On my 14.04 system, the python wx module is part of the python-wxgtk2.8 package. I'd suggest that you try installing that package:

sudo apt-get install python-wxgtk2.8
Preview: (hide)

Comments

Its already installed on my system. To make sure, I removed and installed again but no luck. Do you think there are some path issues?

AsifA gravatar image AsifA  ( May 6 '16 )edit

Your question says:

Probably, the error is due to some additional python installations such as Anaconda 2.4.1 and SALOME.

Does that mean that you have Anaconda installed?

ahendrix gravatar image ahendrix  ( May 6 '16 )edit

Yes. I have Anaconda and SALOME installed.

AsifA gravatar image AsifA  ( May 6 '16 )edit
1

I don't have any experience with Anaconda myself, but other posts on answers.ros.org indicate that it doesn't behave well with system-installed python modules. I would try to run ROS with the system version of python, or try to set your PYTHONPATH so that Anaconda uses the system python libraries.

ahendrix gravatar image ahendrix  ( May 6 '16 )edit

As a last resort you can uninstall Anaconda.

ahendrix gravatar image ahendrix  ( May 6 '16 )edit

By "system-installed python modules" you mean the python that comes by default with Ubuntu 14.04?

AsifA gravatar image AsifA  ( May 6 '16 )edit
1

By system-installed python modules, I'm referring to any python modules that are installed through apt-get. (They're usually in /usr/lib/python2.7/dist-packages )

ahendrix gravatar image ahendrix  ( May 6 '16 )edit

Hi, have you found the solution to this "No module named wx" problem yet? I am using ROS Indigo on Ubuntu 14.04, and I have tried "sudo apt-get install python-wxgtk2.8", and have no luck getting rid of this problem.

cvcook gravatar image cvcook  ( Jul 8 '16 )edit
0

answered Aug 14 '16

schwarmcyc gravatar image

Hi I face with the same proble because of Python Anaconda can you type python --version to check? if it echo Python 2.x.x :: Anaconda 2.x.x (64-bit) problably the problem

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...

cheers.

Preview: (hide)

Question Tools

2 followers

Stats

Asked: May 5 '16

Seen: 1,976 times

Last updated: Aug 14 '16