修改:进到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. pgsql给表字段设置默认值及设置主键

    ALTER TABLE pavement_damage_dtl_temp add PRIMARY key(id); ALTER table pavement_damage_dtl_temp alter ...

  2. java生成uniappKey

    1.首先检查下自己的电脑有无java环境,打开CMD 输入java -version,如果有安装会跟下图一样: 2.在cmd命令行中执行keytool -genkey -alias mhhk -key ...

  3. SQL Server创建表,存储过程,function函数脚本规范

    --创建新表 /**************************************************************************************** *** ...

  4. memoのMac折腾记录

    memoのMac折腾记录 纯粹是一些零散的学习记录.有错误欢迎指出. 我就是一鼠标党,不会Linux. zsh加载 惭愧,最近才知道bash和zsh是两个不同的终端... 之前看一些mac设置系统环境 ...

  5. 简单的理解synchronized锁升级

    前言 今天碰到一个synchronized锁升级的问题, 查了查, 发现一个帖子举例说明比较贴切, 特此转发, 如有问题, 欢迎讨论说明 转自: 木叶盒子 https://www.bilibili.c ...

  6. [2007年NOIP普及组] Hanoi双塔问题

    给定A.B.C三根足够长的细柱,在A柱上放有2n个中间有孔的圆盘,共有n个不同的尺寸,每个尺寸都有两个相同的圆盘,注意这两个圆盘是不加区分的(下图为n=3的情形).现要将 这些国盘移到C柱上,在移动过 ...

  7. YML Exception 以及 java.nio.charset.MalformedInputException: Input length = 1

    在springboot项目中,第一次遇到的问题是 YML Exception java.nio.charset.MalformedInputException: Input length = 1 ,此 ...

  8. linux虚拟机,ifconfig无法获取静态ip地址

    之前一直显示这种ip地址,如下图(网图),查看了DHCP,是正常启动的,虚拟网络编辑器中设置的也正确.后来发现更改虚拟机的设置后就可以了,如下: 设置方法:VMware-虚拟机-设置-网络适配器,选择 ...

  9. 解决未定义的count键“报错为:"Uncaught ReferenceError: count is not defined"

    报错: 源码:Vuex仓库.js let state = {     count } export default state   解决:未赋值的count键

  10. luogu 4142

    费用流好题 本题的建图很有意思 正常我们看到棋盘问题应该先对整个棋盘黑白染色构成一个二分图,然后再考虑建图的问题 但是本题题目中已经明确区分了不同的斜线,问题在于怎么保证一个"L" ...