From: Régis R. <reg...@gm...> - 2021-03-01 22:33:30
|
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/a20d8440b71adfbf133452d4f6e0fe80de2df7c2578c9b498fb812083383/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 = 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égis Ramillien |