私はこのgithubリポソを使っていくつかのbirdsong解析をしようとしています。私はすべてのサンプルを1つの配列('Collect Samples')に集める段階で問題を見つけました。私は私のシステムと関係があると思われるエラーを受けています。エラーの修正を開始する場所がわからない。 (詳細を知りたい場合は、githubレポへのリンクをご覧ください)見ていただきありがとうございます!Pythonマルチプロセッシングプール、OSError:Errno 2このようなファイルやディレクトリがありません
def job(fn):
return load_sample(fn, sr=sr,
max_length=max_length, fixed_length=fixed_length)
pool = Pool()
%time results = pool.map(job, files[:limit])
print 'Processed', len(results), 'samples'
---------------------------------------------------------------------------
OSError Traceback (most recent call last)
<ipython-input-8-5d12f8de2a12> in <module>()
3 max_length=max_length, fixed_length=fixed_length)
4 pool = Pool()
----> 5 get_ipython().magic(u'time results = pool.map(job, files[:limit])')
6 print 'Processed', len(results), 'samples'
/home/notebook/anaconda2/lib/python2.7/site-packages/IPython/core/interactiveshell.pyc in magic(self, arg_s)
2156 magic_name, _, magic_arg_s = arg_s.partition(' ')
2157 magic_name = magic_name.lstrip(prefilter.ESC_MAGIC)
-> 2158 return self.run_line_magic(magic_name, magic_arg_s)
2159
2160 #-------------------------------------------------------------------------
/home/notebook/anaconda2/lib/python2.7/site-packages/IPython/core/interactiveshell.pyc in run_line_magic(self, magic_name, line)
2077 kwargs['local_ns'] = sys._getframe(stack_depth).f_locals
2078 with self.builtin_trap:
-> 2079 result = fn(*args,**kwargs)
2080 return result
2081
<decorator-gen-59> in time(self, line, cell, local_ns)
/home/notebook/anaconda2/lib/python2.7/site-packages/IPython/core/magic.pyc in <lambda>(f, *a, **k)
186 # but it's overkill for just that one bit of state.
187 def magic_deco(arg):
--> 188 call = lambda f, *a, **k: f(*a, **k)
189
190 if callable(arg):
/home/notebook/anaconda2/lib/python2.7/site-packages/IPython/core/magics/execution.pyc in time(self, line, cell, local_ns)
1183 else:
1184 st = clock2()
-> 1185 exec(code, glob, local_ns)
1186 end = clock2()
1187 out = None
<timed exec> in <module>()
/home/notebook/anaconda2/lib/python2.7/multiprocessing/pool.pyc in map(self, func, iterable, chunksize)
249 '''
250 assert self._state == RUN
--> 251 return self.map_async(func, iterable, chunksize).get()
252
253 def imap(self, func, iterable, chunksize=1):
/home/notebook/anaconda2/lib/python2.7/multiprocessing/pool.pyc in get(self, timeout)
565 return self._value
566 else:
--> 567 raise self._value
568
569 def _set(self, i, obj):
OSError: [Errno 2] No such file or directory
また、役立つ場合は、Python 2.7.13 | Anaconda 4.4.0を実行しています。
ああ、エラーがresults = pool.map(job, files[:limit])
事前のおかげでたくさんある原因となるライン。
https://github.com/worldveil/dejavu/issues/36私はffmpegをインストールする際に実際に問題が発生しているため、この問題が発生する可能性があります –