![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Error
L_C_an
这个作者很懒,什么都没留下…
展开
-
ubuntu下Python中matplotlib报错No module named _tkinter
解决方式,运行一下代码安装tkinter即可:sudo apt install python3-tk原创 2019-03-14 12:42:23 · 485 阅读 · 0 评论 -
ubuntu中升级pip后出现ImportError: cannot import name main
在Ubuntu中,升级了pip,再次使用pip 安装相关的python包的时候就出现以下错误:ImportError: cannot import name main解决:pip文件在usr/bin目录下,cd进去,进行以下修改把下面的三行:from pip import mainif name == ‘main’:sys.exit(main())换成下面的三行:from pip ...原创 2019-03-14 13:28:55 · 342 阅读 · 0 评论 -
Python读取中文文件报错UnicodeDecodeError: 'gbk' codec can't decode byte 0xaf in position 64
python读取包含中文的文件报错:UnicodeDecodeError: ‘gbk’ codec can’t decode byte 0xaf in position 64: illegal multibyte sequence解决方法:打开文件时添加 encoding=’utf-8’ 进行编码即可原程序:with open('test.txt','r') as file: fi...原创 2019-03-14 13:25:50 · 8475 阅读 · 1 评论 -
keras运行报错ValueError: Graph disconnected: cannot obtain value for tensor Tensor
keras运行报错ValueError: Graph disconnected: cannot obtain value for tensor Tensor(“input_1:0”, shape=(?, 64, 64, 3), dtype=float32) at layer “input_1”. The following previous layers were accessed without...原创 2019-03-14 13:21:23 · 19217 阅读 · 12 评论 -
使用h5py保存文件时报错:TypeError: Object dtype dtype('O') has no native HDF5 equivalent
使用h5py保存文件时报错:TypeError: Object dtype dtype(‘O’) has no native HDF5 equivalent因为保存的时候字典对应的值仍然是字典, file[key]=value h5py进行上述操作时,value不可以是dict字典(也有可能value的值是TensorFlow的tensor数据格式所以...原创 2019-03-14 13:17:41 · 6313 阅读 · 0 评论 -
使用matplotlib画图时用以下代码报错如下:AttributeError: Unknown property axisbg
使用plt.subplot()画图时报错:AttributeError: Unknown property axisbg原代码如下:plt.subplot(221+i, axisbg=color)matplotlib2.2中将axisbg替换为facecolor在程序中使用facecolor即可如下:plt.subplot(221+i, facecolor=color)...原创 2019-03-14 13:15:18 · 2986 阅读 · 2 评论 -
Python用GPU的CUDA加速时报错:NvvmSupportError: lib NVVM cannot be found. Do `conda install cudatoolkit`:
Python报错:NvvmSupportError: libNVVM cannot be found. Do `conda install cudatoolkit`: library nvvm not found 添加如下环境变量: 1.系统变量的设置 CUDA_BIN_PATH %CUDA_PATH%\bin ...原创 2019-03-14 13:07:43 · 5372 阅读 · 1 评论 -
python用GPU的CUDA加速时报错:nvcc fatal : Cannot find compiler 'cl.exe' in PATH
解决方法:将cl.exe的路径添加到环境变量的path中然后重启计算机(重启才会生效)原创 2019-03-14 12:56:08 · 3366 阅读 · 3 评论 -
python中用pickle打开文件报错:EOFError: Ran out of input
用pickle.dump()保存文件之后如果不关闭文件就会出现此错误f=open('test.pkl','wb')pickle.dump(dict,f)f.close() #后面添加关闭就不会报错原创 2019-03-14 12:50:07 · 7101 阅读 · 3 评论 -
matplotlib画scatter图报错:TypeError: ufunc 'sqrt' not supported for the input types, and the inputs
报错如下:TypeError: ufunc ‘sqrt’ not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ‘‘safe’’原程序:plt.scatter(k_point[2][i]...原创 2019-03-19 13:12:24 · 13090 阅读 · 2 评论