How to install pillow

RĂ©gis Ramillien <[email protected]> Mon, 1 Mar 2021 23:33:03 +0100
Newsgroups gmane.comp.lang.jython.user
Message-ID <CAJ2pqHpLo+jCqoi8CJ4s72+-vv56zNRLxBvHny0cW_XyLS-ceg@mail.gmail.com>
--===============1165029605204538524==
Content-Type: multipart/alternative; boundary="000000000000103f3d05bc813410"

--000000000000103f3d05bc813410
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Dear jython users,

I'm new to python, and I would like to call a python script from java.
After a little bit of research, I decided to use jython.

I want the java program to let an admin generate custom excel files using
python.

That's why I need to install openpyxl, multiprocessing and finally pillow
to load images into the xlsx.

But installing pillow gives me some troubles.
First, I got a "java heap space" exception. So I tried installing it using
this command:
---------------------------------------------------------------------------=
-------------------
jython -J-Xmx1g -m pip install pillow.
---------------------------------------------------------------------------=
-------------------
I know, you're right, 1g seems enormous ! But I still get java heap space
with 512mb...

And with 1g of memory, I receive this stack:
---------------------------------------------------------------------------=
-------------------
c:\Tools\jython2.7.2\bin>jython -J-Xmx1g -m pip install pillow
[33mDEPRECATION: A future version of pip will drop support for Python 2.7.
[0m
Collecting pillow
  Using cached
https://files.pythonhosted.org/packages/b3/d0/a20d8440b71adfbf133452d4f6e0f=
e80de2df7c2578c9b498fb812083383/Pillow-6.2.2.tar.gz
[31m    ERROR: Complete output from command python setup.py egg_info: [0m
[31m    ERROR: Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File
"C:\Users\RGISRA~1\AppData\Local\Temp\pip-install-ctmgop\pillow\setup.py",
line 25, in <module>
        import mp_compile
      File "mp_compile.py", line 11, in <module>
        from multiprocessing import Pool, cpu_count
      File
"C:\Tools\jython2.7.2\Lib\site-packages\multiprocessing\__init__.py", line
64, in <module>
        import multiprocessing.patch
      File
"C:\Tools\jython2.7.2\Lib\site-packages\multiprocessing\patch.py", line 58,
in <module>
        class ConditionPatch(object):
      File
"C:\Tools\jython2.7.2\Lib\site-packages\multiprocessing\patch.py", line 61,
in ConditionPatch
        notify_all =3D threading._Condition.notifyAll.im_func
    AttributeError: 'module' object has no attribute '_Condition'
    ---------------------------------------- [0m
[31mERROR: Command "python setup.py egg_info" failed with error code 1 in
C:\Users\RGISRA~1\AppData\Local\Temp\pip-install-ctmgop\pillow\ [0m
[33mWARNING: You are using pip version 19.1, however version 20.3.4 is
available.
You should consider upgrading via the 'pip install --upgrade pip' command.
[0m
---------------------------------------------------------------------------=
-------------------

Does any one able to install pillow on jython ? Or is it a pillow issue ?
Or my fault ?

Thank you all for your kind help !

Best regards,

R=C3=A9gis Ramillien

--000000000000103f3d05bc813410
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><div dir=3D"ltr"><div dir=3D"ltr"><div di=
r=3D"ltr"><div dir=3D"ltr"><div dir=3D"ltr">Dear jython users,<div><br></di=
v><div>I&#39;m new to python, and I would like to call a python script from=
 java.</div><div>After a little bit of research, I decided to use jython.</=
div><div><br></div><div>I want the java program to let an admin generate cu=
stom excel files using python.</div><div><br></div><div>That&#39;s why I ne=
ed to install openpyxl, multiprocessing and finally=C2=A0pillow to load ima=
ges into the xlsx.</div><div><br></div><div>But installing pillow gives me =
some troubles.=C2=A0</div><div>First, I got a &quot;java heap space&quot; e=
xception. So I tried installing it using this command:</div><div>----------=
---------------------------------------------------------------------------=
---------<br></div><div>jython -J-Xmx1g -m pip install pillow.</div><div>--=
---------------------------------------------------------------------------=
-----------------<br></div><div>I know, you&#39;re right, 1g seems enormous=
 ! But I still get java heap space with 512mb...<br></div><div><br></div><d=
iv>And with 1g of memory, I receive this stack:</div><div>-----------------=
---------------------------------------------------------------------------=
--</div><div><div>c:\Tools\jython2.7.2\bin&gt;jython -J-Xmx1g -m pip instal=
l pillow</div><div> [33mDEPRECATION: A future version of pip will drop supp=
ort for Python 2.7. [0m</div><div>Collecting pillow</div><div>=C2=A0 Using =
cached <a href=3D"https://files.pythonhosted.org/packages/b3/d0/a20d8440b71=
adfbf133452d4f6e0fe80de2df7c2578c9b498fb812083383/Pillow-6.2.2.tar.gz">http=
s://files.pythonhosted.org/packages/b3/d0/a20d8440b71adfbf133452d4f6e0fe80d=
e2df7c2578c9b498fb812083383/Pillow-6.2.2.tar.gz</a></div><div> [31m=C2=A0 =
=C2=A0 ERROR: Complete output from command python setup.py egg_info: [0m</d=
iv><div> [31m=C2=A0 =C2=A0 ERROR: Traceback (most recent call last):</div><=
div>=C2=A0 =C2=A0 =C2=A0 File &quot;&lt;string&gt;&quot;, line 1, in &lt;mo=
dule&gt;</div><div>=C2=A0 =C2=A0 =C2=A0 File &quot;C:\Users\RGISRA~1\AppDat=
a\Local\Temp\pip-install-ctmgop\pillow\setup.py&quot;, line 25, in &lt;modu=
le&gt;</div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 import mp_compile</div><div>=
=C2=A0 =C2=A0 =C2=A0 File &quot;mp_compile.py&quot;, line 11, in &lt;module=
&gt;</div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 from multiprocessing import Pool=
, cpu_count</div><div>=C2=A0 =C2=A0 =C2=A0 File &quot;C:\Tools\jython2.7.2\=
Lib\site-packages\multiprocessing\__init__.py&quot;, line 64, in &lt;module=
&gt;</div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 import multiprocessing.patch</di=
v><div>=C2=A0 =C2=A0 =C2=A0 File &quot;C:\Tools\jython2.7.2\Lib\site-packag=
es\multiprocessing\patch.py&quot;, line 58, in &lt;module&gt;</div><div>=C2=
=A0 =C2=A0 =C2=A0 =C2=A0 class ConditionPatch(object):</div><div>=C2=A0 =C2=
=A0 =C2=A0 File &quot;C:\Tools\jython2.7.2\Lib\site-packages\multiprocessin=
g\patch.py&quot;, line 61, in ConditionPatch</div><div>=C2=A0 =C2=A0 =C2=A0=
 =C2=A0 notify_all =3D threading._Condition.notifyAll.im_func</div><div>=C2=
=A0 =C2=A0 AttributeError: &#39;module&#39; object has no attribute &#39;_C=
ondition&#39;</div><div>=C2=A0 =C2=A0 -------------------------------------=
--- [0m</div><div> [31mERROR: Command &quot;python setup.py egg_info&quot; =
failed with error code 1 in C:\Users\RGISRA~1\AppData\Local\Temp\pip-instal=
l-ctmgop\pillow\ [0m</div><div> [33mWARNING: You are using pip version 19.1=
, however version 20.3.4 is available.</div><div>You should consider upgrad=
ing via the &#39;pip install --upgrade pip&#39; command. [0m</div></div><di=
v>-------------------------------------------------------------------------=
---------------------<br></div><div><br></div><div>Does any one able to ins=
tall pillow on jython ? Or is it a pillow issue ? Or my fault ?</div><div><=
br></div><div>Thank you all for your kind help !</div><div><br></div><div>B=
est regards,</div><div><br></div><div>R=C3=A9gis Ramillien</div></div></div=
></div></div></div></div></div>

--000000000000103f3d05bc813410--


--===============1165029605204538524==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============1165029605204538524==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Jython-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jython-users

--===============1165029605204538524==--