Hi,
Error (Happened after I fixed the error above and I tried to rosrun tf view_frames)
user@ubuntu:~$ rosrun tf view_frames
Traceback (most recent call last):
File "/opt/ros/fuerte/stacks/geometry/tf/scripts/view_frames", line 43, in <module>
import roslib; roslib.load_manifest(PKG)
File "/opt/ros/fuerte/lib/python2.7/dist-packages/roslib/__init__.py", line 50, in <module>
from roslib.launcher import load_manifest
File "/opt/ros/fuerte/lib/python2.7/dist-packages/roslib/launcher.py", line 42, in <module>
import rospkg
ImportError: No module named rospkg
Solution executed: (Make no difference) $sudo apt-get install python-rospkg $sudo apt-get install --reinstall ros-fuerte-ros-comm reinstall python 2.7
user@ubuntu:~$ env | grep ROS
ROS_ROOT=/opt/ros/fuerte/share/ros
ROSLISP_PACKAGE_DIRECTORY=/opt/ros/fuerte/share/common-lisp/ros
ROS_PACKAGE_PATH=/opt/ros/fuerte/share:/opt/ros/fuerte/stacks
ROS_MASTER_URI=http://localhost:11311
ROS_DISTRO=fuerte
ROS_ETC_DIR=/opt/ros/fuerte/etc/ros
PYTHONPATH=/opt/ros/fuerte/lib/python2.7/dist-packages:/opt/ros/fuerte/lib/python2.7/dist-packages:
Please help I can't continue with my work, very much appreciated.
Originally posted by FuerteNewbie on ROS Answers with karma: 123 on 2013-10-01
Post score: 0
Original comments
Comment by tfoote on 2013-10-03:
What is your PYTHON_PATH?
Comment by FuerteNewbie on 2013-10-03:
/opt/ros/fuerte/lib/python2.7/dist-packages:/home/user/usr/lib/pymodules/python2.7/
I just added 'export $PYTHONPATH=/usr/lib/pymodules/python2.7/' that's it looks a little different right now, after I add it into pythonpath now my bad marshall data(string ref out of range) come back again..
Comment by FuerteNewbie on 2013-10-03:
How to set my pythonpath back to default?
Comment by tfoote on 2013-10-03:
If you open a new terminal that will reset your environment back to what's in you ~/.bashrc is there anything in that? Can you share what your env is with 'env | grep ROS && env | grep PY. Please add it as an edit of your question to get good formatting.
Comment by dornhege on 2013-10-04:
What happens if you just open python
and type import rospkg
?
Comment by Dirk Thomas on 2013-10-05:
What Ubuntu version are you using and what Python version?
Comment by FuerteNewbie on 2013-10-06:
I am using python 2.7, it was functioning well before. Until I edit my roslaunch file someday and trying to roslaunch it and the python seems to be crashed on that time.
@dornhege
import rospkg Traceback (most recent call last): File "", line 1, in ImportError: No module named rospkg