pip install weditor安装出错

安装失败

C:\Users\miaoc>pip3.9 install weditor
Collecting weditor
  Using cached weditor-0.6.5.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
  ╰─> [28 lines of output]
      C:\Users\miaoc\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\dist.py:642: UserWarning: Usage of dash-separated 'author-email' will not be supported in future versions. Please use the underscore name 'author_email' instead
        warnings.warn(
      C:\Users\miaoc\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\dist.py:642: UserWarning: Usage of dash-separated 'home-page' will not be supported in future versions. Please use the underscore name 'home_page' instead
        warnings.warn(
      C:\Users\miaoc\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\dist.py:642: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
        warnings.warn(
      ERROR:root:Error parsing
      Traceback (most recent call last):
        File "c:\users\miaoc\appdata\local\temp\pip-install-mapijyhi\weditor_d8549ee936e84df1966d1c621c6030ce\.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\miaoc\appdata\local\temp\pip-install-mapijyhi\weditor_d8549ee936e84df1966d1c621c6030ce\.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\miaoc\appdata\local\temp\pip-install-mapijyhi\weditor_d8549ee936e84df1966d1c621c6030ce\.eggs\pbr-5.8.1-py3.9.egg\pbr\hooks\__init__.py", line 25, in setup_hook
          metadata_config.run()
        File "c:\users\miaoc\appdata\local\temp\pip-install-mapijyhi\weditor_d8549ee936e84df1966d1c621c6030ce\.eggs\pbr-5.8.1-py3.9.egg\pbr\hooks\base.py", line 27, in run
          self.hook()
        File "c:\users\miaoc\appdata\local\temp\pip-install-mapijyhi\weditor_d8549ee936e84df1966d1c621c6030ce\.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\miaoc\appdata\local\temp\pip-install-mapijyhi\weditor_d8549ee936e84df1966d1c621c6030ce\.eggs\pbr-5.8.1-py3.9.egg\pbr\packaging.py", line 860, in get_version
          version = _get_version_from_pkg_metadata(package_name)
        File "c:\users\miaoc\appdata\local\temp\pip-install-mapijyhi\weditor_d8549ee936e84df1966d1c621c6030ce\.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\miaoc\AppData\Local\Programs\Python\Python39\lib\email\__init__.py", line 54, in message_from_file
          return Parser(*args, **kws).parse(fp)
        File "C:\Users\miaoc\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\miaoc\AppData\Local\Temp\pip-install-mapijyhi\weditor_d8549ee936e84df1966d1c621c6030ce\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.

weditor的0.6.5好像是有问题,安不上,指定成0.6.4就好了。看看行不行,我是这样解决了。

pip install -v weditor==0.6.4 -i https://pypi.douban.com/simple


git clone https://github.com/openatx/weditor
pip3 install -e weditor