Jython环境安装pdfminer失败,寻求Python与Maven Java项目集成方案
Python脚本与Maven Java项目集成方案求助(含Jython安装pdfminer失败问题)
尝试将Python脚本与基于Maven的Java项目集成,原本计划通过Jython环境安装pdfminer模块实现,但多次操作均失败,具体记录如下:
失败操作及错误信息
1. 在线安装pdfminer
执行命令:
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'))}
2. 本地安装压缩包(tar.gz/zip)
执行tar.gz包安装命令:
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
执行zip包安装命令:
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
求助需求
寻求Python脚本与Maven Java项目的可行集成方案,不局限于使用Jython的方式。
内容的提问来源于stack exchange,提问作者Cuervo 616
相关产品推荐
相关产品推荐

