Skip to content
This repository has been archived by the owner on Jul 21, 2024. It is now read-only.

pip安装最新版weditor失败 #126

Open
xmhwws opened this issue Dec 11, 2022 · 9 comments
Open

pip安装最新版weditor失败 #126

xmhwws opened this issue Dec 11, 2022 · 9 comments

Comments

@xmhwws
Copy link

xmhwws commented Dec 11, 2022

Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)] on win32

pip3 install -U weditor
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting weditor
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/b0/44/11705bbef441e98495adffdb29f52da034bdcaf84fe31928577217b13ce6/weditor-0.6.7.tar.gz (2.2 MB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [31 lines of output]
      D:\Python\lib\site-packages\setuptools\dist.py:774: UserWarning: Usage of dash-separated 'author-email' will not be supported in future versions. Please use the underscore name 'author_email' instead
        % (opt, underscore_opt)
      D:\Python\lib\site-packages\setuptools\dist.py:774: UserWarning: Usage of dash-separated 'home-page' will not be supported in future versions. Please use the underscore name 'home_page' instead
        % (opt, underscore_opt)
      D:\Python\lib\site-packages\setuptools\dist.py:774: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
        % (opt, underscore_opt)
      D:\Python\lib\site-packages\setuptools\installer.py:30: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
        SetuptoolsDeprecationWarning,
      WARNING: The wheel package is not available.
      Error parsing
      Traceback (most recent call last):
        File "c:\users\admin\appdata\local\temp\pip-install-qvv4xc8a\weditor_f7b420595dfd46759f35059b1f3fea60\.eggs\pbr-5.11.0-py3.7.egg\pbr\core.py", line 111, in pbr
          attrs = util.cfg_to_args(path, dist.script_args)
        File "c:\users\admin\appdata\local\temp\pip-install-qvv4xc8a\weditor_f7b420595dfd46759f35059b1f3fea60\.eggs\pbr-5.11.0-py3.7.egg\pbr\util.py", line 272, in cfg_to_args
          pbr.hooks.setup_hook(config)
        File "c:\users\admin\appdata\local\temp\pip-install-qvv4xc8a\weditor_f7b420595dfd46759f35059b1f3fea60\.eggs\pbr-5.11.0-py3.7.egg\pbr\hooks\__init__.py", line 25, in setup_hook
          metadata_config.run()
        File "c:\users\admin\appdata\local\temp\pip-install-qvv4xc8a\weditor_f7b420595dfd46759f35059b1f3fea60\.eggs\pbr-5.11.0-py3.7.egg\pbr\hooks\base.py", line 27, in run
          self.hook()
        File "c:\users\admin\appdata\local\temp\pip-install-qvv4xc8a\weditor_f7b420595dfd46759f35059b1f3fea60\.eggs\pbr-5.11.0-py3.7.egg\pbr\hooks\metadata.py", line 26, in hook
          self.config['name'], self.config.get('version', None))
        File "c:\users\admin\appdata\local\temp\pip-install-qvv4xc8a\weditor_f7b420595dfd46759f35059b1f3fea60\.eggs\pbr-5.11.0-py3.7.egg\pbr\packaging.py", line 862, in get_version
          version = _get_version_from_pkg_metadata(package_name)
        File "c:\users\admin\appdata\local\temp\pip-install-qvv4xc8a\weditor_f7b420595dfd46759f35059b1f3fea60\.eggs\pbr-5.11.0-py3.7.egg\pbr\packaging.py", line 830, in _get_version_from_pkg_metadata
          pkg_metadata = email.message_from_file(pkg_metadata_file)
        File "D:\Python\lib\email\__init__.py", line 54, in message_from_file
          return Parser(*args, **kws).parse(fp)
        File "D:\Python\lib\email\parser.py", line 53, in parse
          data = fp.read(8192)
      UnicodeDecodeError: 'gbk' codec can't decode byte 0xad in position 829: illegal multibyte sequence
      error in setup command: Error parsing C:\Users\admin\AppData\Local\Temp\pip-install-qvv4xc8a\weditor_f7b420595dfd46759f35059b1f3fea60\setup.cfg: UnicodeDecodeError: 'gbk' codec can't decode byte 0xad in position 829: 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.
@Yebolin
Copy link

Yebolin commented Dec 15, 2022

pip install weditor==0.6.4

@xmhwws
Copy link
Author

xmhwws commented Dec 15, 2022

0.6.4可以正常安装运行
但更新的版本:0.6.5和0.6.7都安装失败!

不知道作者什么时候修复一下相关bug

@Yogichen
Copy link

设置下环境变量即可解决
set PYTHONUTF8=1

@xmhwws
Copy link
Author

xmhwws commented Dec 16, 2022

@Yogichen 试了下

set PYTHONUTF8=1
pip3 install -U weditor

还是报错:

Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting weditor
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/b0/44/11705bbef441e98495adffdb29f52da034bdcaf84fe31928577217b13ce6/weditor-0.6.7.tar.gz (2.2 MB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [32 lines of output]
      D:\Python\lib\site-packages\setuptools\dist.py:774: UserWarning: Usage of dash-separated 'author-email' will not be supported in future versions. Please use the underscore name 'author_email' instead
        % (opt, underscore_opt)
      D:\Python\lib\site-packages\setuptools\dist.py:774: UserWarning: Usage of dash-separated 'home-page' will not be supported in future versions. Please use the underscore name 'home_page' instead
        % (opt, underscore_opt)
      D:\Python\lib\site-packages\setuptools\dist.py:774: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
        % (opt, underscore_opt)
      D:\Python\lib\site-packages\setuptools\installer.py:30: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
        SetuptoolsDeprecationWarning,
      WARNING: The wheel package is not available.
      WARNING: Ignoring invalid distribution -editor (d:\python\lib\site-packages)
      Error parsing
      Traceback (most recent call last):
        File "c:\users\admin\appdata\local\temp\pip-install-6tua7zi3\weditor_bd691e109aa243bb96453b9429631f5a\.eggs\pbr-5.11.0-py3.7.egg\pbr\core.py", line 111, in pbr
          attrs = util.cfg_to_args(path, dist.script_args)
        File "c:\users\admin\appdata\local\temp\pip-install-6tua7zi3\weditor_bd691e109aa243bb96453b9429631f5a\.eggs\pbr-5.11.0-py3.7.egg\pbr\util.py", line 272, in cfg_to_args
          pbr.hooks.setup_hook(config)
        File "c:\users\admin\appdata\local\temp\pip-install-6tua7zi3\weditor_bd691e109aa243bb96453b9429631f5a\.eggs\pbr-5.11.0-py3.7.egg\pbr\hooks\__init__.py", line 25, in setup_hook
          metadata_config.run()
        File "c:\users\admin\appdata\local\temp\pip-install-6tua7zi3\weditor_bd691e109aa243bb96453b9429631f5a\.eggs\pbr-5.11.0-py3.7.egg\pbr\hooks\base.py", line 27, in run
          self.hook()
        File "c:\users\admin\appdata\local\temp\pip-install-6tua7zi3\weditor_bd691e109aa243bb96453b9429631f5a\.eggs\pbr-5.11.0-py3.7.egg\pbr\hooks\metadata.py", line 26, in hook
          self.config['name'], self.config.get('version', None))
        File "c:\users\admin\appdata\local\temp\pip-install-6tua7zi3\weditor_bd691e109aa243bb96453b9429631f5a\.eggs\pbr-5.11.0-py3.7.egg\pbr\packaging.py", line 862, in get_version
          version = _get_version_from_pkg_metadata(package_name)
        File "c:\users\admin\appdata\local\temp\pip-install-6tua7zi3\weditor_bd691e109aa243bb96453b9429631f5a\.eggs\pbr-5.11.0-py3.7.egg\pbr\packaging.py", line 830, in _get_version_from_pkg_metadata
          pkg_metadata = email.message_from_file(pkg_metadata_file)
        File "D:\Python\lib\email\__init__.py", line 54, in message_from_file
          return Parser(*args, **kws).parse(fp)
        File "D:\Python\lib\email\parser.py", line 53, in parse
          data = fp.read(8192)
      UnicodeDecodeError: 'gbk' codec can't decode byte 0xad in position 829: illegal multibyte sequence
      error in setup command: Error parsing C:\Users\admin\AppData\Local\Temp\pip-install-6tua7zi3\weditor_bd691e109aa243bb96453b9429631f5a\setup.cfg: UnicodeDecodeError: 'gbk' codec can't decode byte 0xad in position 829: 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.

@shouhujishu
Copy link

就是编码问题 但是set PYTHONUTF8=1 不足够
win11系统语言 支持中文 utf8编码使用后
在安装会正常

@xmhwws
Copy link
Author

xmhwws commented Mar 5, 2023

@shouhujishu 我系统是win11,搞不清楚为什么不能安装最新版

@shouhujishu
Copy link

@shouhujishu 我系统是win11,搞不清楚为什么不能安装最新版

区域->管理->更改系统区域设置 打勾Beta版:使用XXXX全球语言支持 确认然后重启

@shrike999
Copy link

@shouhujishu 我系统是win11,搞不清楚为什么不能安装最新版

区域->管理->更改系统区域设置 打勾Beta版:使用XXXX全球语言支持 确认然后重启

niubi

@kerneltravel
Copy link

kerneltravel commented Nov 18, 2023

问题根源分析,以及另外一个解决办法 : #145

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants