1.

_tkinter.TclError: no display name and no $DISPLAY environment variable

解决方案:

import matplotlib
matplotlib.use('Agg')
严重怀疑python2.7才用Agg。之前在3.5上,用TkAgg才可以正常生成图像呢。


 

2.

ValueError: Linkage 'Z' uses the same cluster more than once in Python scipy fcluster

原因:数据量太大,scipy.cluster.hierarchy处理不了,会报错。

python-bioInfo-codes-2

解决:

使用fastcluster的linkage,而不用scipy.cluster.hierarchy的。

import fastcluster as fc

安装fastcluster用pip install fastcluster

据说会快一点。

python-bioInfo-codes-2

 

相关文章:

  • 2022-01-31
  • 2021-08-17
  • 2021-11-08
  • 2022-12-23
  • 2022-12-23
  • 2021-06-13
猜你喜欢
  • 2021-09-28
  • 2022-01-04
  • 2021-05-20
  • 2022-12-23
  • 2022-12-23
  • 2021-06-14
  • 2021-12-21
相关资源
相似解决方案