Linux运行python文件出现以下错误:terminate called after throwing an instance of ‘std::runtime_error‘

Linux运行python文件出现以下错误:terminate called after throwing an instance of ‘std::runtime_error’

用anaconda配置的python3.7环境跑python代码出现以下问题

terminate called after throwing an instance of 'std::runtime_error'
  what():  generic_type: cannot initialize type "WorkerId": an object with that name is already defined

----在国内网站找了一大堆没什么用处,最后在国外网站找到了解决方法,分享给大家。
总结来说就是:你安装了两个版本的pytorch ,conda命令和pip命令各安装了一个,一个是1.4版本的,一个是1.3版本的。1.4版本把1.3版本的东西覆盖了(有些命令只有1.3版本的有,1.4的删除了)所有找到用什么命令安装的1.4把它给卸掉。最后如果还没解决问题建议都卸载掉,只安装1.3

如果对你有帮助,扣个赞哟

你可能感兴趣的:(Python深度学习)