修改:进到torch._six源码,看看里面是PY的哪个对象,修改成这对象名试试

_six.py

即将PY3修改为PY37

AttributeError: module 'torch._six' has no attribute 'PY3'的更多相关文章

  1. AttributeError: module 'scipy.misc' has no attribute 'imread'

    运行python程序报错:AttributeError: module 'scipy.misc' has no attribute 'imread' 报错原因1:scipy版本过高 解决方案:降低sc ...

  2. ansible报错AttributeError: module 'urllib.request' has no attribute 'HTTPSHandler'

    报错内容: TASK [activemq : extract activemq tarball] *************************************************** ...

  3. AttributeError: module 'html.parser' has no attribute 'HTMLParseError'

    别人说这种错误大多是,因为beautifulsoup的版本兼容问题, 因为beautifulsoup的4.0以下版本和4.0版本与python3.5以上都不兼容, 网上的解决方案大多是:降python ...

  4. Tensorflow机器学习入门——AttributeError: module 'scipy.misc' has no attribute 'toimage'

    这个bug的解决办法: import cv2 # scipy.misc.toimage(image_array).save('cifar10_data/raw/%d.jpg' % i) cv2.imw ...

  5. pycharm最新版新建工程没导入本地包问题:module 'selenium.webdriver' has no attribute 'Firefox'

    前言 最新版的pycharm做了很大的改变,新建工程的时候,默认不导入本地的安装包,这就导致很多小伙伴踩坑了... 明明已经pip安装过selenium了,但是却报AttributeError:mod ...

  6. Python报错module 'scipy.misc' has no attribute 'xxx'

    Python报错module 'scipy.misc' has no attribute 'imresize' 解决办法: 安装Pillow包,命令如下: pip install Pillow 然后重 ...

  7. pytorch版本问题:AttributeError: 'module' object has no attribute '_rebuild_tensor_v2'

    用pytorch加载训练好的模型的时候遇到了如下的问题: AttributeError: 'module' object has no attribute '_rebuild_tensor_v2' 到 ...

  8. python中引入包的时候报错AttributeError: module 'sys' has no attribute 'setdefaultencoding'解决方法?

    python中引入包的时候报错:import unittestimport smtplibimport timeimport osimport sysimp.reload(sys)sys.setdef ...

  9. Python脚本报错AttributeError: ‘module’ object has no attribute’xxx’解决方法

    最近在编写Python脚本过程中遇到一个问题比较奇怪:Python脚本完全正常没问题,但执行总报错"AttributeError: 'module' object has no attrib ...

  10. attributeError:'module' object has no attribute ** 解决办法

    写了一个小脚本,执行的时候报错: Traceback (most recent call last): File "F:/test/qrcode.py", line 109, in ...

随机推荐

  1. EF特性

    1.EF的 Dbcontext有延迟查询得特性,(用using后就释放了.)在绑定得时候以及失效了.解决办法是toList().toList()是立即查询.但是toList()也有他的问题. 2.释放 ...

  2. uni-app 下载文件 预览 + 保存自定义目录

    作为使用uni-app的小白来说  尝试了好几种方法 终于得到了我想要的效果(如下) 1.点击下载按钮(文件 或者图片)  2.预览 :用户自定义选择查看的软件(图片在手机相册 文件用其他打开预览) ...

  3. macOS 10.14安装win10教程 bootcamp篇

    由于工作以及系统使用习惯上的原因,拥有Mac电脑的用户常常需要用到windows系统,这个时候我们就需要在Mac上安装双系统来满足这一需求,一起来看看macOS 10.14安装win10教程吧. ma ...

  4. 【Java】【Mybatis】如何调用存储过程和存储函数

    https://www.jb51.net/article/230756.htm Mybatis调用存储过程 MyBatis支持使用存储过程的配置.当使用存储过程时,需要设置一个参数"mode ...

  5. vue3封装input组件

    使用了2种方法去封装input组件(.vue与.jsx) 代码如下 父组件: <template> <div> <h1>input组件封装</h1> & ...

  6. uiautomator2自动化工具的下载与安装

    前言: 相信很多使用appium做过APP自动化的人都深有感触: 1,安装麻烦,配置环境可能会难道不少人 2,appium运行慢.时间长 3,uiautomatorviewer定位元素时得关掉appi ...

  7. js 正则表达式与 python正则表达式

    修饰符 1.js i g m i 忽视大小写g 执行全局匹配(查找所有匹配,而非找到第一个匹配后停止)m 执行多行匹配gi 全局匹配+忽略大小写 2.python re.Ire.IGNORECASE让 ...

  8. Docker基本命令之 镜像管理

    镜像管理 docker常用基础命令: 查看docker版本信息:docker version 查看docker系统信息:docker info docker服务相关: 查看docker服务:syste ...

  9. ffmpeg编译错误/libfdk-aacenc.c: In function 'aac_encode_init'

    ffmpeg编译错误/libfdk-aacenc.c: In function 'aac_encode_init' 需要手动打一个补丁 https://git.libav.org/?p=libav.g ...

  10. vue element tree 上移下移

    效果图 需求是:上边没有了应该取最后一个    下边没有了 应该取第一个 直接上代码: <template> <el-tree :key="tree_key" v ...