修改:进到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. Java方法之可变参数

    可变参数[不定项] JDK 1.5开始,Java支持传递同类型的可变参数给一个方法. 在方法声明中,在指定参数类型后加一个省略号(...). 一个方法中只能指定一个可变参数,它必须是方法的最后一个参数 ...

  2. python_名片系统

    """1 - 新建名片 2-显示全部 3-查询名片 0-退出系统""" import card_tools while True: card ...

  3. JavaScript基础知识整理(引用类型-Object)

    Object类型 其他的引用类型都是Object类型的实例,创建Object实例有两种方式 (1)使用构造函数 var obj = new Object(); obj.name = "xia ...

  4. 求两个自然数之间的最大公约数C++实现

    1 #include "pch.h" 2 #include <iostream> 3 using namespace std; 4 5 int main() 6 { 7 ...

  5. 浏览器输入URL发生了什么:DNS解析、TCP握手、HTTP缓存、重定向、服务器状态码、渲染引擎和JS引擎互斥、渲染过程、浏览器进程、网络进程、渲染进程

    输入地址,浏览器查找域名的 IP 地址. 浏览器向 该 IP 地址的web 服务器发送一个 HTTP 请求, 在发送请求之前浏览器和服务器建立TCP的三次握手,判断是否是HTTP缓存, 如果是强制缓存 ...

  6. 【批量下载】url——wget,给定网址,批量下载文件

    写在前面:最近在学习批量下载sci文章并传入noteexpress,从网上学来了一些方法,其中有一步需要使用url将sci-hub上面的文章批量下载下来. 学习网址:[研究生]快速批量下载 Web o ...

  7. Java中Math类常用方法

    ​在编写程序时,可能需要计算一个数的平方根.绝对值或获取一个随机数等.java.lang包中的Math类包含许多用来进行科学计算的static方法,这些方法可以直接通过类名调用.另外,Math类还有两 ...

  8. modesim : mosel not define

    这个星期仿真sdram时,添加的sdram 模型文件在modesim中总是找不到,在qq群里提问和私聊别人都没有得到解决方法.于是自己摸索了好多天.终于得到了解决. 可以看到modesim里面work ...

  9. C++ 用运算符重载 实现复数相加

    #include "stdafx.h" #include <iostream> using namespace std; class Complex {public: ...

  10. PLC入门笔记12

    1.边沿应用 (1)边沿开关 (2)上升沿触发 下降沿触发 (3) MOVP K4M0 D0 传送比较 movp (=mov) 脉冲型指令 前面条件成立只能执行一次,仅执行一次扫描周期 不带P MOV ...