PS D:\WorkSpace\Py> pip install weditor
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting weditor
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/a1/c6/ec92e8d4a95f4e901e3b6764e1b716ac85dd9892d36d5f40fef6063cdbd6/weditor-0.7.2.tar.gz (2.2 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... error
error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [28 lines of output]
Error parsing
Traceback (most recent call last):
File "C:\Users\86139\AppData\Local\Temp\pip-build-env-qjw2ltgj\normal\Lib\site-packages\pbr\core.py", line 105, in pbr
attrs = util.cfg_to_args(path, dist.script_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\86139\AppData\Local\Temp\pip-build-env-qjw2ltgj\normal\Lib\site-packages\pbr\util.py", line 272, in cfg_to_args
pbr.hooks.setup_hook(config)
File "C:\Users\86139\AppData\Local\Temp\pip-build-env-qjw2ltgj\normal\Lib\site-packages\pbr\hooks\__init__.py", line 25, in setup_hook
metadata_config.run()
File "C:\Users\86139\AppData\Local\Temp\pip-build-env-qjw2ltgj\normal\Lib\site-packages\pbr\hooks\base.py", line 27, in run
self.hook()
File "C:\Users\86139\AppData\Local\Temp\pip-build-env-qjw2ltgj\normal\Lib\site-packages\pbr\hooks\metadata.py", line 25, in hook
self.config['version'] = packaging.get_version(
^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\86139\AppData\Local\Temp\pip-build-env-qjw2ltgj\normal\Lib\site-packages\pbr\packaging.py", line 854, in get_version
version = _get_version_from_pkg_metadata(package_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\86139\AppData\Local\Temp\pip-build-env-qjw2ltgj\normal\Lib\site-packages\pbr\packaging.py", line 822, in _get_version_from_pkg_metadata
pkg_metadata = email.message_from_file(pkg_metadata_file)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\language\Python\Lib\email\__init__.py", line 54, in message_from_file
return Parser(*args, **kws).parse(fp)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\language\Python\Lib\email\parser.py", line 53, in parse
data = fp.read(8192)
^^^^^^^^^^^^^
UnicodeDecodeError: 'gbk' codec can't decode byte 0xad in position 645: illegal multibyte sequence
error in setup command: Error parsing C:\Users\86139\AppData\Local\Temp\pip-install-ik95dwee\weditor_89565445f80d4cba9826a4161c601367\setup.cfg: UnicodeDecodeError: 'gbk' codec can't decode byte 0xad in position 645: 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.
解决方法:
git clone https://github.com/openatx/weditor
pip3 install -e weditor