首页 > 编程语言 >python 3.10 报错 _internal.utils.misc import get_installed_distributions

python 3.10 报错 _internal.utils.misc import get_installed_distributions

时间:2022-12-11 09:44:14浏览次数:51  
标签:__ get python installed 3.10 报错 pkg import distributions

python 3.10版本后不能导入 from pip._internal.utils.misc import get_installed_distributions 可以使用 import pkg_resources     用 pkg_resources.working_set: 代替 get_installed_distributions   批量更新所有包python 3.10版本: import pip from subprocess import call import pkg_resources if __name__=='__main__':     for dist in  pkg_resources.working_set:         call('pip install --upgrade '+dist.project_name,shell=True)

标签:__,get,python,installed,3.10,报错,pkg,import,distributions
From: https://www.cnblogs.com/nami/p/16972846.html

相关文章