cd /usr/lib/python3/dist-packages/colcon_python_setup_py/package_identification
sudo gedit python_setup_py.py
change line251: 'from setuptools.extern.packaging.specifiers import SpecifierSet',
to
'from packaging.specifiers import SpecifierSet',
Ubuntu20.04 ModuleNotFoundError: No module named ‘setuptools.extern.packaging‘
最新推荐文章于 2025-09-07 22:06:39 发布
这篇博客介绍了如何编辑/usr/lib/python3/dist-packages/colcon_python_setup_py/package_identification下的python_setup_py.py文件。具体操作是将第251行的旧式导入'from setuptools.extern.packaging.specifiers import SpecifierSet'修改为'from packaging.specifiers import SpecifierSet',以解决因导入错误导致的程序问题。
1万+

被折叠的 条评论
为什么被折叠?



