0
$\begingroup$

Rosanswers logo

when I have the line

"from PIL import Image"

in a node, I get the following error when running my node via rosrun

"ImportError: No module named PIL"

of course, PIL is installed in

/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/PIL

but is not an ROS library. How can I change my manifest.xml to find PIL? If I understand correctly, rosrun clobbers my existing PYTHONPATH (when running python I can import PIL just fine).


Originally posted by jrieffel on ROS Answers with karma: 39 on 2011-04-22

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I resolved it by explicitly putting PIL in my .bashrc's PYTHONPATH

oddly, however, python from the command line runs python 2.6.6, but rosrun on a python node somehow invokes python 2.6.1


Originally posted by jrieffel with karma: 39 on 2011-04-25

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.