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

Configure Python3 path for local docker prerelease script

asked 2015-07-02 14:03:09 -0600

130s gravatar image

updated 2015-07-11 10:17:56 -0600

Following the docker prerelease tutorial, I see the following error. What am I possibly doing wrong?

$ env | grep PYTHONPATH
PYTHONPATH=/opt/ros/indigo/lib/python2.7/dist-packages
$ python -c "import sys; print(sys.path)"
['', '/opt/ros/indigo/lib/python2.7/dist-packages', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/FontTools', '/usr/lib/python2.7/dist-packages/PILcompat', '/usr/lib/python2.7/dist-packages/omniORB/COS', '/usr/lib/python2.7/dist-packages/gst-0.10', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/pymodules/python2.7', '/usr/lib/python2.7/dist-packages/ubuntu-sso-client', '/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode']
n130s@kudu1:/tmp/prerelease_job$ sudo ./prerelease.sh 
Prerelease script
:
+ export PYTHONPATH=/tmp/prerelease_job/ros_buildfarm:
+ python3 -u /tmp/prerelease_job/ros_buildfarm/scripts/devel/run_devel_job.py --rosdistro-index-url https://raw.githubusercontent.com/ros/rosdistro/master/index.yaml indigo default prerelease ubuntu trusty amd64 --distribution-repository-urls http://54.183.65.232/ubuntu/testing --distribution-repository-key-files /tmp/prerelease_job/keys/0.key --dockerfile-dir /tmp/prerelease_job/docker_generating_dockers
Traceback (most recent call last):
  File "/tmp/prerelease_job/ros_buildfarm/scripts/devel/run_devel_job.py", line 20, in <module>
    from ros_buildfarm.templates import create_dockerfile
  File "/tmp/prerelease_job/ros_buildfarm/ros_buildfarm/templates/__init__.py", line 3, in <module>
    from em import Interpreter
ImportError: No module named 'em'

$ locate empy -b
/opt/ros/indigo/share/catkin/cmake/empy.cmake
/opt/ros/jade/share/catkin/cmake/empy.cmake
/usr/bin/empy
/usr/lib/python2.7/dist-packages/empy-3.1.egg-info
/usr/share/doc/python-empy
/usr/share/man/man1/empy.1.gz
/var/lib/dpkg/info/python-empy.list
/var/lib/dpkg/info/python-empy.md5sums
/var/lib/dpkg/info/python-empy.postinst
/var/lib/dpkg/info/python-empy.prerm

(BTW I had to sudo the script. PR is opened for that.)

Ubuntu 14.04

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-07-10 14:44:20 -0600

William gravatar image

Apparently the template evaluation still uses Python3 to run by default, so just make sure you have python3 and python3-empy installed. I'll update the wiki to include this workaround. Ultimately the correct solution would be to have those scripts use Python2 when the Python2 version of ros_buildfarm is installed.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-07-02 14:03:09 -0600

Seen: 332 times

Last updated: Jul 11 '15