云网牛站
所在位置:首页 > HarmonyOS问题与回答 > 在Ubuntu 18.04下安装deveco-device-tool.run失败如何处理

在Ubuntu 18.04下安装deveco-device-tool.run失败如何处理

2021-07-27 21:40:50作者:shk242673稿源:HarmonyOS站

问题:提示AssertionError: pip-21.1.1-py3-none-any.whl installation failed. return code 1、[ERROR  ] pip-21.1.1-py3-none-any.whl installation failed. return code 1等错误信息,这是在Ubuntu 18.04系统下运行deveco-device-tool-2.1.0+279451.b672a187.run安装失败后返回的信息,该如何处理?

在Ubuntu 18.04下安装deveco-device-tool.run失败如何处理

 

问题追加:

1、./deveco-device-tool-2.1.0+279451.b672a187.run

Verifying archive integrity...  100%   All good.

Uncompressing DevEco Device Tool 2.1.0+279451.b672a187  100%

DevEco Device Tool already installed. Uninstalling...

~/.local/share/deveco-device-tool /tmp/selfgz1235031217

[INFO   ] Uninstalling...

[INFO   ] Rollback deploy

[INFO   ] Remove python VEnv

[INFO   ] Final clean-up

/tmp/selfgz1235031217

~/.local/share/deveco-device-tool /tmp/selfgz1235031217

[INFO   ] Installing environment...

[INFO   ] Create python VEnv: 3.8.0

[INFO   ] Install py package pip-21.1.1-py3-none-any.whl

[ERROR  ] pip-21.1.1-py3-none-any.whl installation failed. return code 1

Traceback (most recent call last):

File "install-environment.py", line 131, in <module>

assert p.returncode == 0, f'{file} installation failed. return code {p.returncode}'

AssertionError: pip-21.1.1-py3-none-any.whl installation failed. return code 1

[ERROR  ] pip-21.1.1-py3-none-any.whl installation failed. return code 1

[INFO   ] Press enter to continue...

2、~/.local/share/deveco-install.log

[2021-07-27 11:35:53,128] [DEBUG  ] [install-environment.py:76] Unknown arguments []

[2021-07-27 11:35:53,128] [INFO   ] [install-environment.py:82] Uninstalling...

[2021-07-27 11:35:53,128] [INFO   ] [install-environment.py:83] Rollback deploy

[2021-07-27 11:35:53,128] [INFO   ] [install-environment.py:91] Remove python VEnv

[2021-07-27 11:35:53,128] [INFO   ] [install-environment.py:94] Final clean-up

[2021-07-27 11:35:53,276] [DEBUG  ] [install-environment.py:67]

[2021-07-27 11:35:53,277] [DEBUG  ] [install-environment.py:75] Known arguments Namespace(destination='/home/server/.deveco-device-tool', quiet=False, uninstall=False)

[2021-07-27 11:35:53,277] [DEBUG  ] [install-environment.py:76] Unknown arguments []

[2021-07-27 11:35:53,279] [INFO   ] [install-environment.py:112] Installing environment...

[2021-07-27 11:35:53,280] [INFO   ] [install-environment.py:113] Create python VEnv: 3.8.0

[2021-07-27 11:35:54,181] [INFO   ] [install-environment.py:125] Install py package pip-21.1.1-py3-none-any.whl

[2021-07-27 11:35:54,630] [DEBUG  ] [Logger.py:74] Traceback (most recent call last):

[2021-07-27 11:35:54,630] [DEBUG  ] [Logger.py:74]   File "/usr/lib/python3.8/runpy.py", line 183, in _run_module_as_main

[2021-07-27 11:35:54,630] [DEBUG  ] [Logger.py:74]     mod_name, mod_spec, code = _get_module_details(mod_name, _Error)

[2021-07-27 11:35:54,630] [DEBUG  ] [Logger.py:74]   File "/usr/lib/python3.8/runpy.py", line 142, in _get_module_details

[2021-07-27 11:35:54,630] [DEBUG  ] [Logger.py:74]     return _get_module_details(pkg_main_name, error)

[2021-07-27 11:35:54,630] [DEBUG  ] [Logger.py:74]   File "/usr/lib/python3.8/runpy.py", line 109, in _get_module_details

[2021-07-27 11:35:54,630] [DEBUG  ] [Logger.py:74]     __import__(pkg_name)

[2021-07-27 11:35:54,630] [DEBUG  ] [Logger.py:74]   File "/home/server/.deveco-device-tool/core/deveco-venv/lib/python3.8/site-packages/pip/__init__.py", line 30, in <module>

[2021-07-27 11:35:54,630] [DEBUG  ] [Logger.py:74]     from pip.utils import deprecation, dist_is_editable

[2021-07-27 11:35:54,630] [DEBUG  ] [Logger.py:74] ValueError: source code string cannot contain null bytes

[2021-07-27 11:35:54,642] [ERROR  ] [install-environment.py:149] pip-21.1.1-py3-none-any.whl installation failed. return code 1

Traceback (most recent call last):

File "install-environment.py", line 131, in <module>

assert p.returncode == 0, f'{file} installation failed. return code {p.returncode}'

AssertionError: pip-21.1.1-py3-none-any.whl installation failed. return code 1

[2021-07-27 11:35:54,642] [ERROR  ] [install-environment.py:37] pip-21.1.1-py3-none-any.whl installation failed. return code 1

[2021-07-27 11:35:54,642] [INFO   ] [install-environment.py:39] Press enter to continue...

 

回答:

出现以上提示请将python版本切换一下,比如切换到python3.7版本后就可以正常安装了。

相关参考:用python3.9.5环境安装鸿蒙DevEco Device Tool出错

精选文章
热门文章