tag:python, visual c++, pyhanlp, jpype
本文写于2020年9月10日,阅读时请注意时效性。
问题出现:
在使用命令pip isntall pyhanlp安装pyhanlp的过程中出现了如下的错误信息,类似的问题也会在安装mysql-python、scrapy时出现。在安装RUST语言的时候也会遇到类似的情况。
C:\Windows\system32>pip install pyhanlp -i https://pypi.tuna.tsinghua.edu.cn/simple
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting pyhanlp
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/8f/99/13078d71bc9f77705a29f932359046abac3001335ea1d21e91120b200b21/pyhanlp-0.1.66.tar.gz (86 kB)
|████████████████████████████████| 86 kB 628 kB/s
Collecting jpype1==0.7.0
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/28/63/784834e8a24ec2e1ad7f703c3dc6c6fb372a77cc68a2fdff916e18a4449e/JPype1-0.7.0.tar.gz (470 kB)
|████████████████████████████████| 470 kB 2.2 MB/s
Using legacy 'setup.py install' for pyhanlp, since package 'wheel' is not installed.
Using legacy 'setup.py install' for jpype1, since package 'wheel' is not installed.
Installing collected packages: jpype1, pyhanlp
Running setup.py install for jpype1 ... error
ERROR: Command errored out with exit status 1:
command: 'c:\program files\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\raner\AppData\Local\Temp\pip-install-mamcaw85\jpype1\setup.py'"'"'; file='"'"'C:\Users\raner\AppData\Local\Temp\pip-install-mamcaw85\jpype1\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\raner\AppData\Local\Temp\pip-record-ed77_3sc\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\program files\python38\Include\jpype1'
cwd: C:\Users\raner\AppData\Local\Temp\pip-install-mamcaw85\jpype1
Complete output (52 lines):
c:\program files\python38\lib\distutils\dist.py:274: UserWarning: Unknown distribution opti