其他分享
首页 > 其他分享> > entry_points() got an unexpected keyword argument ‘group‘

entry_points() got an unexpected keyword argument ‘group‘

作者:互联网

@[TOC](python twine上传问题:entry_points() got an unexpected keyword argument ‘group’)

长时间没有更新的软件包,在准备更新的时候发现,上传失败!!!!entry_points() got an unexpected keyword argument ‘group’

检查命令twine check dist/*时报错

Traceback (most recent call last):
  File "/root/anaconda3/bin/twine", line 8, in <module>
    sys.exit(main())
  File "/root/anaconda3/lib/python3.8/site-packages/twine/__main__.py", line 28, in main
    result = cli.dispatch(sys.argv[1:])
  File "/root/anaconda3/lib/python3.8/site-packages/twine/cli.py", line 43, in dispatch
    registered_commands = entry_points(group="twine.registered_commands")
TypeError: entry_points() got an unexpected keyword argument 'group'

importlib-metadata多个版本共存问题

使用python -m pip freeze查看包版本发现

importlib-metadata==3.10.1

再通过python -c "import importlib_metadata;print(importlib_metadata.version('importlib-metadata'))"查看发现importlib-metadata版本为

2.0.0

解决问题问题

两次pip uninstall importlib-metadata就能卸载掉所有,然后重装importlib-metadata,pip install importlib-metadata

结果检查

twine check dist/*

无报错

twine upload dist/*

成功

标签:twine,unexpected,group,importlib,keyword,points,entry,metadata
来源: https://blog.csdn.net/qq_43337286/article/details/120776791