uiautomator2 icon indicating copy to clipboard operation
uiautomator2 copied to clipboard

pip install -U weditor python3.9无法安装成功

Open zhajingwen opened this issue 2 years ago • 3 comments

G:\代码\spider-code>pip install -U weditor

Preparing metadata (setup.py) ... error error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [29 lines of output] C:\Users\shixiaolong\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\dist.py:717: UserWarning: Usage of dash-separated 'author-email' will not be sup ported in future versions. Please use the underscore name 'author_email' instead warnings.warn( C:\Users\shixiaolong\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\dist.py:717: UserWarning: Usage of dash-separated 'home-page' will not be suppor ted in future versions. Please use the underscore name 'home_page' instead warnings.warn( C:\Users\shixiaolong\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\dist.py:717: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead warnings.warn( WARNING: The wheel package is not available. ERROR:root:Error parsing Traceback (most recent call last): File "c:\users\shixiaolong\appdata\local\temp\pip-install-_b47_a_s\weditor_2a9d7009c6d141ffa86dd30d77a03a7c.eggs\pbr-5.8.1-py3.9.egg\pbr\core.py", line 111, in pbr attrs = util.cfg_to_args(path, dist.script_args) File "c:\users\shixiaolong\appdata\local\temp\pip-install-_b47_a_s\weditor_2a9d7009c6d141ffa86dd30d77a03a7c.eggs\pbr-5.8.1-py3.9.egg\pbr\util.py", line 272, in cfg_to _args pbr.hooks.setup_hook(config) File "c:\users\shixiaolong\appdata\local\temp\pip-install-b47_a_s\weditor_2a9d7009c6d141ffa86dd30d77a03a7c.eggs\pbr-5.8.1-py3.9.egg\pbr\hooks_init.py", line 25, in setup_hook metadata_config.run() File "c:\users\shixiaolong\appdata\local\temp\pip-install-_b47_a_s\weditor_2a9d7009c6d141ffa86dd30d77a03a7c.eggs\pbr-5.8.1-py3.9.egg\pbr\hooks\base.py", line 27, in r un self.hook() File "c:\users\shixiaolong\appdata\local\temp\pip-install-_b47_a_s\weditor_2a9d7009c6d141ffa86dd30d77a03a7c.eggs\pbr-5.8.1-py3.9.egg\pbr\hooks\metadata.py", line 25, in hook self.config['version'] = packaging.get_version( File "c:\users\shixiaolong\appdata\local\temp\pip-install-_b47_a_s\weditor_2a9d7009c6d141ffa86dd30d77a03a7c.eggs\pbr-5.8.1-py3.9.egg\pbr\packaging.py", line 860, in g et_version version = _get_version_from_pkg_metadata(package_name) File "c:\users\shixiaolong\appdata\local\temp\pip-install-b47_a_s\weditor_2a9d7009c6d141ffa86dd30d77a03a7c.eggs\pbr-5.8.1-py3.9.egg\pbr\packaging.py", line 828, in _ get_version_from_pkg_metadata pkg_metadata = email.message_from_file(pkg_metadata_file) File "C:\Users\shixiaolong\AppData\Local\Programs\Python\Python39\lib\email_init.py", line 54, in message_from_file return Parser(*args, **kws).parse(fp) File "C:\Users\shixiaolong\AppData\Local\Programs\Python\Python39\lib\email\parser.py", line 53, in parse data = fp.read(8192) UnicodeDecodeError: 'gbk' codec can't decode byte 0xad in position 825: illegal multibyte sequence error in setup command: Error parsing C:\Users\shixiaolong\AppData\Local\Temp\pip-install-_b47_a_s\weditor_2a9d7009c6d141ffa86dd30d77a03a7c\setup.cfg: UnicodeDecodeError : 'gbk' codec can't decode byte 0xad in position 825: illegal multibyte sequence [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

× Encountered error while generating package metadata. ╰─> See above for output.

note: This is an issue with the package mentioned above, not pip. hint: See above for details.

zhajingwen avatar Feb 28 '22 04:02 zhajingwen

报错:UnicodeDecodeError: 'gbk' codec can't decode byte ……

一、原因分析 因为编码格式不对。

二、解决办法 将weditor下载到本地,把weditor-0.6.5.tar.gz解压, 进入解压的文件夹 查看详细报错内容,在报错的.py文件中查找 with open(), 添加", encoding='utf-8'"后再次执行本地安装,即可解决该问题。

Kleverx avatar Mar 23 '22 11:03 Kleverx

同样的问题 换装0.6.4 版本解决 pip install weditor==0.6.4

Solawhite avatar Jul 15 '22 02:07 Solawhite

报错:UnicodeDecodeError: 'gbk' codec can't decode byte ……

一、原因分析 因为编码格式不对。

二、解决办法 将weditor下载到本地,把weditor-0.6.5.tar.gz解压, 进入解压的文件夹 查看详细报错内容,在报错的.py文件中查找 with open(), 添加", encoding='utf-8'"后再次执行本地安装,即可解决该问题。

建议给个PR

mingyuan-xia avatar Oct 11 '22 06:10 mingyuan-xia