AttributeError: 'module' 对象 (scipy) 没有属性 'misc' [英] AttributeError: 'module' object (scipy) has no attribute 'misc'

查看:59
本文介绍了AttributeError: 'module' 对象 (scipy) 没有属性 'misc'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从 ubuntu 12.04 更新到 ubuntu 12.10,我编写的 python 模块突然不再适用于模块 scipy 没有属性misc"的错误消息.这在以前有效.更新后我仍在使用python 2.7.这是代码崩溃的地方

I updated from ubuntu 12.04 to ubuntu 12.10 and the python module I have written suddenly no longer works with the error message that the module scipy does not have the attribute 'misc'. This worked previously. I am still using python 2.7 after the update. Here is where the code crashes

import scipy
scipy.misc.imsave(slice,dat)

有什么想法吗?

推荐答案

>>> import scipy
>>> scipy.misc
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'misc'
>>> 
>>> 
>>> import scipy.misc
>>> scipy.misc.imsave
<function imsave at 0x19cfa28>
>>>

这在 scipy 中似乎很常见.

Which seems to be quite common with scipy.

这篇关于AttributeError: 'module' 对象 (scipy) 没有属性 'misc'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆