我尝试安装 DRecPy 库,其安装描述见here。
不幸的是,它不起作用。我尝试过使用 pip 安装它,并使用 setup.py 直接安装。 两种方式都有错误。
第一个如下:
Building wheels for collected packages: pandas
Building wheel for pandas (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [1062 lines of output]
running bdist_wheel
running build
running build_py
creating build
第二个是:
Traceback (most recent call last):
File "projectpath\DRecPy\setup.py", line 15, in <module>
long_description = fh.read()
File "path\Python310\lib\encodings\cp1250.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x88 in position 5916: character maps to <undefined>
貌似自述文件中有一个字符无法用设置的编码读取。由于您已经有了源代码,请替换此处提到的行:
File "projectpath\DRecPy\setup.py", line 15, in <module>
long_description = fh.read()
与
long_description = ""
在
setup.py
文件中。然后做
python setup.py install
请注意,这表明该包未使用 python 3.10 进行测试,因此您可能会在这里遇到其他问题。
还可以考虑通过 将其发布到 github 上
,向包的作者报告此错误我已经安装了 3.12.0 版本,决定卸载并降级到 3.11.4。通过“pip install”,我安装了Jpype1和tabula-py,有序加载其他包,解决了问题。