我曾尝试使用命令安装pypdfocr:无法解析的Python的OCR库的依赖pypdfocr
pip install pypdfocr
pip install -i https://pypi.anaconda.org/pypi/simple pypdfocr
但我不断收到错误消息:
File "C:\Users\888537\AppData\Local\Temp\pip-build-b4mwr93n\evernote\setup
.py", line 6
exec x
^
SyntaxError: Missing parentheses in call to 'exec'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\888537\A
ppData\Local\Temp\pip-build-b4mwr93n\evernote\
以下是日志的安装:
[Anaconda3] C:\Users\888537>pip install -i https://pypi.anaconda.org/pypi/simple
pypdfocr
Collecting pypdfocr
Downloading https://pypi.anaconda.org/pypi/simple/pypdfocr/0.7.6/pypdfocr-0.7.
6.tar.gz
Requirement already satisfied (use --upgrade to upgrade): pillow>=2.2 in d:\anac
onda3\lib\site-packages (from pypdfocr)
Requirement already satisfied (use --upgrade to upgrade): reportlab>=2.7 in d:\a
naconda3\lib\site-packages (from pypdfocr)
Collecting watchdog>=0.6.0 (from pypdfocr)
Downloading https://pypi.anaconda.org/pypi/simple/watchdog/0.8.1/watchdog-0.8.
1.tar.gz (154kB)
100% |################################| 163kB 52kB/s
Requirement already satisfied (use --upgrade to upgrade): pypdf2>=1.23 in d:\ana
conda3\lib\site-packages (from pypdfocr)
Collecting evernote (from pypdfocr)
Downloading https://pypi.anaconda.org/pypi/simple/evernote/1.25.0/evernote-1.2
5.0.tar.gz (140kB)
100% |################################| 143kB 187kB/s
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\888537\AppData\Local\Temp\pip-build-b4mwr93n\evernote\setup
.py", line 6
exec x
^
SyntaxError: Missing parentheses in call to 'exec'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\888537\A
ppData\Local\Temp\pip-build-b4mwr93n\evernote\
我该如何纠正这个安装问题与pypdfocr图书馆?
非常感谢Dalen的帮助。 :)我能够通过在安装了Python 2.x的Anaconda中创建一个虚拟环境来解决问题。我在Python虚拟环境中成功安装了pypdfocr,因为安装的evernote依赖项在Python 2.x中没有任何错误。我之前使用的Python 3.4在安装依赖关系evernote时导致了问题。 –
非常好!你走了更长的路,但如果你想继续使用蟒蛇,也许它是最好的。使用虚拟环境非常有创意。 +1。 – Dalen
谢谢Dalen :) –