Re: ImportError No module named Image in Jenkins

2016-06-09 Thread Cherry Tsai
Hi Mark,

I found the other solution. First, I install "Python Plugin 
" in Jenkins 
platform. And I can write the script in Jenkins configuration -> Execute 
Python script.



Now I can use Python package "Image", compare two images.




On Wednesday, May 25, 2016 at 6:47:08 AM UTC+8, Mark Waite wrote:
>
> Your results seem different from mine.  The commands I executed:
>
> $ docker run -i --rm -p 8080:8080 -p 5:5 jenkins /bin/bash
> python
> print 1 + 1
> print 2 + 2
> from PIL import Image
> ^D
> 2
> 4
> Traceback (most recent call last):
>   File "", line 5, in 
> ImportError: No module named PIL
>
> As far as I can tell, that means the PIL module is not available in the 
> docker image named "jenkins".
>
> Mark Waite
>
> On Tue, May 24, 2016 at 4:25 PM Cherry Tsai  > wrote:
>
>> Must be use Dockerfile install? I used manually install in Jenkins 
>> container.
>>
>> I tried to run command in Jenkins container:
>>
>> $ python
>> $ from PIL import Image
>>
>> It's working for me.
>>
>> Then I checked Python2.7 path, it has PIL and Image folder in 
>> /usr/local/lib/python2.7.
>>
>> But only Jenkins couldn't use Python PIL and Image. I'm very confused.
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Jenkins Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to jenkinsci-use...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jenkinsci-users/0c7bce9d-71c4-446c-9b53-e621fe2d34ef%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/9fa217c2-95c9-40c3-b86b-eb8c8be8caf2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: ImportError No module named Image in Jenkins

2016-05-24 Thread Mark Waite
Your results seem different from mine.  The commands I executed:

$ docker run -i --rm -p 8080:8080 -p 5:5 jenkins /bin/bash
python
print 1 + 1
print 2 + 2
from PIL import Image
^D
2
4
Traceback (most recent call last):
  File "", line 5, in 
ImportError: No module named PIL

As far as I can tell, that means the PIL module is not available in the
docker image named "jenkins".

Mark Waite

On Tue, May 24, 2016 at 4:25 PM Cherry Tsai  wrote:

> Must be use Dockerfile install? I used manually install in Jenkins
> container.
>
> I tried to run command in Jenkins container:
>
> $ python
> $ from PIL import Image
>
> It's working for me.
>
> Then I checked Python2.7 path, it has PIL and Image folder in
> /usr/local/lib/python2.7.
>
> But only Jenkins couldn't use Python PIL and Image. I'm very confused.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/0c7bce9d-71c4-446c-9b53-e621fe2d34ef%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtHgcyO3wfzrnKsJQ%2BOAWcznGu8BA_hK4GsLQN8z%2BP_OjQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: ImportError No module named Image in Jenkins

2016-05-24 Thread Cherry Tsai
Must be use Dockerfile install? I used manually install in Jenkins 
container.

I tried to run command in Jenkins container:

$ python
$ from PIL import Image

It's working for me.

Then I checked Python2.7 path, it has PIL and Image folder in 
/usr/local/lib/python2.7.

But only Jenkins couldn't use Python PIL and Image. I'm very confused.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/0c7bce9d-71c4-446c-9b53-e621fe2d34ef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: ImportError No module named Image in Jenkins

2016-05-23 Thread Mark Waite
I would guess that the official Jenkins docker image does not include the
Python imaging library by default.  You probably need to install the python
imaging library by adding an entry to your Dockerfile:

RUN apt-get update && apt-get install -y python-imaging

You may also need to refer to
http://askubuntu.com/questions/156484/how-do-i-install-python-imaging-library-pil


Mark Waite


On Sun, May 22, 2016 at 11:44 PM Cherry Tsai  wrote:

> Hi guys,
>
> I had python trouble. I want to compare two images using python in
> Jenkins.
>
> When I added "import Image" or "from PIL import Image" in my script, it
> will show error message "ImportError: No module named Image".
>
> But use "import os, time", it was working.
>
>
> Basic environment:
>
>1.
>
>use docker official jenkins
>2.
>
>python 2.7
>3.
>
>PYTHONPATH is /usr/lib/python2.7/dist-packages/PIL
>/usr/lib/python2.7/dist-packages/PIL
>4.
>
>Sys.path is ['', '/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/PILcompat']
>
>
> Please help me how to solve it?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/83a816a4-d55d-42ad-8e09-84657d85b4a9%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtEwh%3DXA2KxVjbV0w8q-_GiKh8K5cKsjOrGy%3DVFVqe_%3DWg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


ImportError No module named Image in Jenkins

2016-05-22 Thread Cherry Tsai


Hi guys,

I had python trouble. I want to compare two images using python in Jenkins. 

When I added "import Image" or "from PIL import Image" in my script, it 
will show error message "ImportError: No module named Image".

But use "import os, time", it was working.


Basic environment:

   1. 
   
   use docker official jenkins
   2. 
   
   python 2.7
   3. 
   
   PYTHONPATH is /usr/lib/python2.7/dist-packages/PIL
   /usr/lib/python2.7/dist-packages/PIL
   4. 
   
   Sys.path is ['', '/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/PILcompat']
   

Please help me how to solve it?

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/83a816a4-d55d-42ad-8e09-84657d85b4a9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.