问题:
运行python代码时报错:
ModuleNotFoundError: No module named 'pkg_resources'
想到下载该模组:pip install pkg_resources,报错:
ERROR: Could not find a version that satisfies the requirement pkg_resources (from versions: none)
ERROR: No matching distribution found for pkg_resources
解决方案:
实际上不需要下载pkg_resources这个包,命令行输入以下命令,再次运行代码:
python -m pip install --upgrade pip setuptools wheel -i https://pypi.tuna.tsinghua.edu.cn/simple
亲测有效,如果镜像网址失效可以换一个镜像网址。