【发布时间】:2021-02-10 03:01:34
【问题描述】:
我无法让 PIP 安装 Sikuli。
我用谷歌搜索了这个问题,我看到一些网站说要将以下目录添加到我的系统变量中。
JAVA_HOME C:\Program Files\Java\jdk-15.0.1
JRE_HOME C:\Program Files\Java\jre1.8.0_271
这些到我的路径:
C:\Program Files\Java\jdk-15.0.1\bin
所以那些应该是正确的。除此之外,我找不到任何其他解决方案。
我已经更新了 pip 和设置工具。
这是完整的错误:
ERROR: Command errored out with exit status 1:
command: 'c:\python38-32\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Marco\\AppData\\Local\\Temp\\pip-install-gefwt25k\\sikuli\\setup.py'"'"'; __file__='"'"'C:\\Users\\Marco\\AppData\\Local\\Temp\\pip-install-gefwt25k\\sikuli\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\Marco\AppData\Local\Temp\pip-pip-egg-info-6svrs62_'
cwd: C:\Users\Marco\AppData\Local\Temp\pip-install-gefwt25k\sikuli\
Complete output (44 lines):
WARNING: Skipping page https://github.com/kevlened/pyjnius/releases/download/v1.1/jnius-1.1-dev.win32-py2.7.exe because the GET request got Content-Type: application/octet-stream.The only supported Content-Type is text/html
ERROR: Command errored out with exit status 1:
command: 'c:\python38-32\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Marco\\AppData\\Local\\Temp\\pip-wheel-q3cmrzpa\\jnius\\setup.py'"'"'; __file__='"'"'C:\\Users\\Marco\\AppData\\Local\\Temp\\pip-wheel-q3cmrzpa\\jnius\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\Marco\AppData\Local\Temp\pip-pip-egg-info-0b1bl_8i'
cwd: C:\Users\Marco\AppData\Local\Temp\pip-wheel-q3cmrzpa\jnius\
Complete output (7 lines):
'readlink' is not recognized as an internal or external command,
operable program or batch file.
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Marco\AppData\Local\Temp\pip-wheel-q3cmrzpa\jnius\setup.py", line 121, in <module>
raise Exception('Unable to determine JRE_HOME')
Exception: Unable to determine JRE_HOME
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Traceback (most recent call last):
File "c:\python38-32\lib\site-packages\setuptools\installer.py", line 126, in fetch_build_egg
subprocess.check_call(cmd)
File "c:\python38-32\lib\subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['c:\\python38-32\\python.exe', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', 'C:\\Users\\Marco\\AppData\\Local\\Temp\\tmp8pfcre2v', '--quiet', '--find-links', 'https://github.com/kevlened/pyjnius/releases/download/v1.1/jnius-1.1-dev.win32-py2.7.exe', 'jnius>=1.1-dev']' returned non-zero exit status 1.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Marco\AppData\Local\Temp\pip-install-gefwt25k\sikuli\setup.py", line 16, in <module>
setup(
File "c:\python38-32\lib\site-packages\setuptools\__init__.py", line 152, in setup
_install_setup_requires(attrs)
File "c:\python38-32\lib\site-packages\setuptools\__init__.py", line 147, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "c:\python38-32\lib\site-packages\setuptools\dist.py", line 673, in fetch_build_eggs
resolved_dists = pkg_resources.working_set.resolve(
File "c:\python38-32\lib\site-packages\pkg_resources\__init__.py", line 764, in resolve
dist = best[req.key] = env.best_match(
File "c:\python38-32\lib\site-packages\pkg_resources\__init__.py", line 1049, in best_match
return self.obtain(req, installer)
File "c:\python38-32\lib\site-packages\pkg_resources\__init__.py", line 1061, in obtain
return installer(requirement)
File "c:\python38-32\lib\site-packages\setuptools\dist.py", line 732, in fetch_build_egg
return fetch_build_egg(self, req)
File "c:\python38-32\lib\site-packages\setuptools\installer.py", line 128, in fetch_build_egg
raise DistutilsError(str(e)) from e
distutils.errors.DistutilsError: Command '['c:\\python38-32\\python.exe', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', 'C:\\Users\\Marco\\AppData\\Local\\Temp\\tmp8pfcre2v', '--quiet', '--find-links', 'https://github.com/kevlened/pyjnius/releases/download/v1.1/jnius-1.1-dev.win32-py2.7.exe', 'jnius>=1.1-dev']' returned non-zero exit status 1.
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output
【问题讨论】:
-
你的 pip 和 setuptools 是最新的吗?
-
忘了提,但是是的。我在其他网站上看到了,所以更新了这些并再次尝试。
-
你安装了多个python版本吗?