Ask Your Question

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
$ 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 script
+ export PYTHONPATH=/tmp/prerelease_job/ros_buildfarm:
+ python3 -u /tmp/prerelease_job/ros_buildfarm/scripts/devel/ --rosdistro-index-url indigo default prerelease ubuntu trusty amd64 --distribution-repository-urls --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/", line 20, in <module>
    from ros_buildfarm.templates import create_dockerfile
  File "/tmp/prerelease_job/ros_buildfarm/ros_buildfarm/templates/", line 3, in <module>
    from em import Interpreter
ImportError: No module named 'em'

$ locate empy -b

(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

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


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

Seen: 219 times

Last updated: Jul 11 '15