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

import select ImportError: No module named select

asked 2014-04-04 13:48:18 -0500

mah_mpc gravatar image

updated 2016-10-24 09:10:51 -0500

ngrennan gravatar image

Since yesterday I've been having a problem to use the next command:

$ rospack depends1 rospy

And any other command like this.

I receive the next output:

$ rospack depends1 rospy

failed to load symbols, rosdep will not function properly Cannot import rospkg, rosdep will not function properly Traceback (most recent call last): File "/usr/lib/pymodules/python2.7/rosdep2/rospack.py", line 37, in <module> import subprocess File "/usr/lib/python2.7/subprocess.py", line 429, in <module> import select ImportError: No module named select Error in sys.excepthook: Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/apport_python_hook.py", line 61, in apport_excepthook from io import StringIO File "/usr/lib/python2.7/io.py", line 51, in <module> import _io ImportError: /usr/lib/python2.7/lib-dynload/_io.so: undefined symbol: PyUnicodeUCS4_EncodeUTF32

Original exception was: Traceback (most recent call last): File "/usr/lib/pymodules/python2.7/rosdep2/rospack.py", line 37, in <module> import subprocess File "/usr/lib/python2.7/subprocess.py", line 429, in <module> import select ImportError: No module named select Traceback (most recent call last): File "/usr/lib/pymodules/python2.7/rosdep2/rospack.py", line 37, in <module> import subprocess File "/usr/lib/python2.7/subprocess.py", line 429, in <module> import select ImportError: No module named select Error in sys.excepthook: Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/apport_python_hook.py", line 61, in apport_excepthook from io import StringIO File "/usr/lib/python2.7/io.py", line 51, in <module> import _io ImportError: /usr/lib/python2.7/lib-dynload/_io.so: undefined symbol: PyUnicodeUCS4_EncodeUTF32

Original exception was: Traceback (most recent call last): File "/usr/lib/pymodules/python2.7/rosdep2/rospack.py", line 37, in <module> import subprocess File "/usr/lib/python2.7/subprocess.py", line 429, in <module> import select ImportError: No module named select [rospack] Error: could not find python module 'rosdep2.rospack'. is rosdep up-to-date (at least 0.10.4)?

I'm using Ubuntu 12.10 (Quantal), with ROS-HYDRO.

My rosdep version is:

$ rosdep --version

0.10.25

I've already tried to find some solution, but I couldn't. I've tried to 'autoremove' ros and clean install again, but nothing changed.

When I try to 'import select' using the python environment in terminal, everything is OK.

My PYTHONPATH is OK, as follows:

$ echo $PYTHONPATH

/home/usr/catkin_ws/devel/lib/python2.7/dist-packages:/opt/ros/hydro/lib/python2.7/dist-packages

Can anybody help me please?

edit retag flag offensive close merge delete

Comments

Thanks for trying to help! I had some other problems with my ubuntu and so I re-installed everything! Now I don't have that problem anymore, neither the other problems... =)

mah_mpc gravatar image mah_mpc  ( 2014-04-06 19:38:03 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2014-04-08 16:36:26 -0500

mah_mpc gravatar image

I discovered why I had that problem! Like tfoote thought, I have some custom paths, and the python paths got into a conflict! I just organized them and everything is in ok now!

edit flag offensive delete link more

Comments

Could you please tell me what was your problem, I have been having the same problem for 2 weeks, and I have yet to solve it, my env variables seem ok to me

asiron gravatar image asiron  ( 2014-06-02 11:20:29 -0500 )edit

As I'm working with NAO robot, I indicate its paths in the .bashrc file, one of them indicates the $PYTHONPATH. This path got into a conflit with the paths in ~/catkin_ws/devel/setup.bash. Everything was solved when I put the source ~/catkin_ws/devel/setup.bash AFTER exporting the NAO's python path.

mah_mpc gravatar image mah_mpc  ( 2014-06-02 17:58:37 -0500 )edit

Hope it helps! =)

mah_mpc gravatar image mah_mpc  ( 2014-06-02 18:00:23 -0500 )edit
1

answered 2014-04-04 15:40:18 -0500

tfoote gravatar image

updated 2014-04-04 15:40:50 -0500

Can you say how to reproduce your environment? It looks like you have several custom paths. Or can you reproduce this with a minimal environment to isolate the problem?

edit flag offensive delete link more

Question Tools

Stats

Asked: 2014-04-04 13:48:18 -0500

Seen: 4,984 times

Last updated: Apr 04 '14