HarvestText
HarvestText copied to clipboard
安装出现很多问题
这个安装的时候很多报错啊,比如 No module named 'community' 很奇怪,有这个模块?
community
这个模块对应的是python-louvain
,它已经包括在requirements.txt里面,所以如果正常安装的话应该会包括这个模块。
你说在安装的时候报错,那就是还没装好就遇到了这个问题?那能否尝试一下,clone本仓库,或者把上面的requirements.txt下载下来,然后在同一路径下运行pip install -r requirements.txt
?如果还有问题的话,你可以说明一下你的python版本和操作系统,让我检查一下问题。
Requirement already satisfied: chardet in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (from pdfminer.six->pattern->-r requirements.txt (line 17)) (4.0.0)
Collecting cryptography
Downloading cryptography-3.4.6-cp36-abi3-macosx_10_10_x86_64.whl (2.0 MB)
|████████████████████████████████| 2.0 MB 2.3 MB/s
Collecting sortedcontainers
Downloading sortedcontainers-2.3.0-py2.py3-none-any.whl (29 kB)
Requirement already satisfied: cffi>=1.12 in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (from cryptography->pdfminer.six->pattern->-r requirements.txt (line 17)) (1.14.5)
Requirement already satisfied: pycparser in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (from cffi>=1.12->cryptography->pdfminer.six->pattern->-r requirements.txt (line 17)) (2.20)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (from requests->pattern->-r requirements.txt (line 17)) (1.26.2)
Requirement already satisfied: certifi>=2017.4.17 in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (from requests->pattern->-r requirements.txt (line 17)) (2020.12.5)
Requirement already satisfied: idna<3,>=2.5 in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (from requests->pattern->-r requirements.txt (line 17)) (2.10)
Requirement already satisfied: setuptools in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (from zc.lockfile->cherrypy->pattern->-r requirements.txt (line 17)) (49.2.1)
Using legacy 'setup.py install' for jpype1, since package 'wheel' is not installed.
Using legacy 'setup.py install' for sgmllib3k, since package 'wheel' is not installed.
Installing collected packages: more-itertools, jaraco.functools, tempora, jaraco.text, jaraco.classes, zc.lockfile, soupsieve, sortedcontainers, sgmllib3k, portend, jaraco.collections, cryptography, cheroot, jpype1
Running setup.py install for sgmllib3k ... done
Running setup.py install for jpype1 ... error
ERROR: Command errored out with exit status 1:
command: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/nq/gp55kn4x22q0n9z0mq_rykvw0000gn/T/pip-install-vb6o4x00/jpype1_fd27bfa0ff444905b56acc0df48ebdaa/setup.py'"'"'; file='"'"'/private/var/folders/nq/gp55kn4x22q0n9z0mq_rykvw0000gn/T/pip-install-vb6o4x00/jpype1_fd27bfa0ff444905b56acc0df48ebdaa/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/nq/gp55kn4x22q0n9z0mq_rykvw0000gn/T/pip-record-0uhuocq6/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/jpype1
cwd: /private/var/folders/nq/gp55kn4x22q0n9z0mq_rykvw0000gn/T/pip-install-vb6o4x00/jpype1_fd27bfa0ff444905b56acc0df48ebdaa/
Complete output (94 lines):
/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py:274: UserWarning: Unknown distribution option: 'use_scm_version'
warnings.warn(msg)
running install
running build
running build_py
creating build
creating build/lib.macosx-10.9-universal2-3.9
creating build/lib.macosx-10.9-universal2-3.9/jpype
copying jpype/_jcollection.py -> build/lib.macosx-10.9-universal2-3.9/jpype
copying jpype/_jcomparable.py -> build/lib.macosx-10.9-universal2-3.9/jpype
copying jpype/_classpath.py -> build/lib.macosx-10.9-universal2-3.9/jpype
copying jpype/_jio.py -> build/lib.macosx-10.9-universal2-3.9/jpype
copying jpype/_jtypes.py -> build/lib.macosx-10.9-universal2-3.9/jpype
copying jpype/_pykeywords.py -> build/lib.macosx-10.9-universal2-3.9/jpype
copying jpype/_jproxy.py -> build/lib.macosx-10.9-universal2-3.9/jpype
copying jpype/_gui.py -> build/lib.macosx-10.9-universal2-3.9/jpype
copying jpype/_darwin.py -> build/lib.macosx-10.9-universal2-3.9/jpype
copying jpype/nio.py -> build/lib.macosx-10.9-universal2-3.9/jpype
copying jpype/_jstring.py -> build/lib.macosx-10.9-universal2-3.9/jpype
copying jpype/_cygwin.py -> build/lib.macosx-10.9-universal2-3.9/jpype
copying jpype/init.py -> build/lib.macosx-10.9-universal2-3.9/jpype
copying jpype/_jboxed.py -> build/lib.macosx-10.9-universal2-3.9/jpype
copying jpype/types.py -> build/lib.macosx-10.9-universal2-3.9/jpype
copying jpype/beans.py -> build/lib.macosx-10.9-universal2-3.9/jpype
copying jpype/_jvmfinder.py -> build/lib.macosx-10.9-universal2-3.9/jpype
copying jpype/imports.py -> build/lib.macosx-10.9-universal2-3.9/jpype
copying jpype/_jcustomizer.py -> build/lib.macosx-10.9-universal2-3.9/jpype
copying jpype/_core.py -> build/lib.macosx-10.9-universal2-3.9/jpype
copying jpype/_jinit.py -> build/lib.macosx-10.9-universal2-3.9/jpype
copying jpype/_linux.py -> build/lib.macosx-10.9-universal2-3.9/jpype
copying jpype/_jarray.py -> build/lib.macosx-10.9-universal2-3.9/jpype
copying jpype/_jobject.py -> build/lib.macosx-10.9-universal2-3.9/jpype
copying jpype/_jclass.py -> build/lib.macosx-10.9-universal2-3.9/jpype
copying jpype/_windows.py -> build/lib.macosx-10.9-universal2-3.9/jpype
copying jpype/_jexception.py -> build/lib.macosx-10.9-universal2-3.9/jpype
copying jpype/reflect.py -> build/lib.macosx-10.9-universal2-3.9/jpype
copying jpype/_jpackage.py -> build/lib.macosx-10.9-universal2-3.9/jpype
running build_ext
running build_java
Using Jar cache
creating build/lib
creating build/lib/org
creating build/lib/org/jpype
creating build/lib/org/jpype/classloader
copying native/jars/org/jpype/classloader/JPypeClassLoader.class -> build/lib/org/jpype/classloader
copying native/jars/org.jpype.jar -> build/lib
running build_thunk
Building thunks
including thunk build/lib/org/jpype/classloader/JPypeClassLoader.class
Traceback (most recent call last):
File "
我安装也遇到很多问题, MacOS Python3.9
我安装也遇到很多问题, MacOS Python3.9
这个问题主要是其中一个依赖库jpype和python 3.9的兼容性问题,可以尝试使用较低版本的python,比如python 3.6。