Anaconda / Spyder新包装?

时间:2018-03-04 23:19:57

标签: python anaconda spyder

我正在尝试在我的Anaconda / Spyder安装(Win 10/64位)上安装ffmpeg。我在Anaconda有它。

Anaconda

然而,Spyder不承认

import matplotlib.animation as ani

ani.MovieWriterRegistry().list()
[]

import ffmpeg
Traceback (most recent call last):

  File "<ipython-input-4-16f5f3b4de71>", line 1, in <module>
    import ffmpeg

ModuleNotFoundError: No module named 'ffmpeg'

我错过了一步吗?我显然对此很新,所以任何帮助都会非常感激

1 个答案:

答案 0 :(得分:0)

Spyder维护者在这里)这是由常见的混淆def hamming_dist(sequence1, sequence2): """ Calculates the hamming distance between 2 sequences """ assert len(sequence1) == len(sequence2) return sum(sequence1 !=sequence2 for sequence1,sequence2 \ in itertools.izip(sequence1,sequence2)) def group_sequences(sequences_list): trash_sequences = [] main_sequence = sequences_list[0] clustered_sequence = defaultdict(list) while len(sequences_list) > 1: for sequence in sequences_list: ham_dist = hamming_dist(main_sequence,sequence) if hamming_dist < 30: trash_sequences.append(sequence) for similar_sequences in trash_sequences: sequences_list.remove(similar_sequences) clustered_sequence[main_tcr].append(similar_sequences) else: clustered_sequence[main_sequence].append(None) return clustered_sequence 引起的,这是错误的。

基本上,conda为你安装了ffmpeg C库,而不是Python绑定它。

我已就此主题给出了详细的答案,所以我不打算再做一次。例如,请参阅this one