Install Module pdfminer in Jython

50 Views Asked by At

I trying to connect a Python script with a Java project that uses Maven. To achieve this, I need to install a module into the Jython environment. I have tried the following approach.

C:\Users\lordonez\.m2\repository>java -jar C:\Users\lordonez\.m2\repository\org\python\jython-standalone\2.7.2rc1\jython-standalone-2.7.2rc1.jar -m pip install pdfminer-20191010
DEPRECATION: A future version of pip will drop support for Python 2.7.
Collecting pdfminer-20191010
  ERROR: Certificate did not match expected hostname: pypi.org. Certificate: {'notAfter': 'May 30 18:53:39 2024 GMT', 'subject': ((('commonName', 'www.python.org'),),), 'subjectAltName': (('DNS', 'www.python.org'), ('DNS', '*.python.org'), ('DNS', 'docs.python.org'), ('DNS', 'downloads.python.org'), ('DNS', 'pypi.python.org'))}
C:\Users\lordonez\.m2\repository>java -jar C:\Users\lordonez\.m2\repository\org\python\jython-standalone\2.7.2rc1\jython-standalone-2.7.2rc1.jar -m pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org C:\Users\lordonez\.m2\repository\org\python\jython-standalone\2.7.2rc1\pdfminer-20191010.tar.gz
DEPRECATION: A future version of pip will drop support for Python 2.7.
Processing c:\users\lordonez\.m2\repository\org\python\jython-standalone\2.7.2rc1\pdfminer-20191010.tar.gz
    ERROR: Error [Errno 2] No such file or directory while executing command python setup.py egg_info
ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory


C:\Users\lordonez\.m2\repository>java -jar C:\Users\lordonez\.m2\repository\org\python\jython-standalone\2.7.2rc1\jython-standalone-2.7.2rc1.jar -m pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org C:\Users\lordonez\.m2\repository\org\python\jython-standalone\2.7.2rc1\pdfminer-20191010.zip
DEPRECATION: A future version of pip will drop support for Python 2.7.
Processing c:\users\lordonez\.m2\repository\org\python\jython-standalone\2.7.2rc1\pdfminer-20191010.zip
    ERROR: Error [Errno 2] No such file or directory while executing command python setup.py egg_info
ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory

I need help to connect a Python script. I don't mind if I don't use Jython, but it's currently the only solution I can find.

0

There are 0 best solutions below