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

ImportError: No module named rospkg Reinstalled still not work

asked 2015-11-22 23:40:40 -0600

Robert Delong gravatar image

updated 2015-11-23 09:09:40 -0600

gvdhoorn gravatar image

I installed the simulation environment of Nao Players in RobCup. Everything is okay but cannot find Rospkg. I reinstalled with many methods but still not work. In fact, the pkg is there exactly and if I import rospkg in python client, the error occurs. I wonder if there is some problem about Python. Hope someone can help me. Thank you very much

Traceback (most recent call last):
  File "/opt/ros/indigo/share/xacro/xacro.py", line 60, in <module>
    import xacro
  File "/opt/ros/indigo/lib/python2.7/dist-packages/xacro/__init__.py", line 45, in <module>
    from roslaunch import substitution_args
  File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/__init__.py", line 48, in <module>
    import rospkg

**ImportError: No module named rospkg**

while processing /opt/ros/indigo/share/nao_description/launch/upload_nao.launch:
Invalid <param> tag: Cannot load command parameter [robot_description]: command [/opt/ros/indigo/share/xacro/xacro.py /opt/ros/indigo/share/nao_description/urdf/naoV40_generated_urdf/nao_robot.xacro] returned with code [1]. 

Param xml is <param command="$(find xacro)/xacro.py $(find nao_description)/urdf/nao$(arg version)_generated_urdf/nao_robot.xacro" name="robot_description"/>
The traceback for the exception was written to the log file
edit retag flag offensive close merge delete

Comments

1

How you are installing rospkg? sudo apt-get install python-rospkg or with sudo pip install -U rospkg?

yasagitov gravatar image yasagitov  ( 2015-11-23 01:47:19 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-11-23 09:50:40 -0600

Robert Delong gravatar image

I found out the reason. Because i installed 'conda', the bad guy change the env path of python. The sys cannot access the package. I delete it and make the pkg work. Thank you very much. In fact, I meet a even sever problem now. I will post it tomorrow since it is too late now. Here is mid-night,hah

edit flag offensive delete link more

Comments

1

How can we fix it without removing conda? I'm working on a project that needs it.

Ahmed Abdalla gravatar image Ahmed Abdalla  ( 2016-06-05 03:48:34 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2015-11-22 23:38:18 -0600

Seen: 1,372 times

Last updated: Nov 23 '15