Итак, у меня был следующий код, который, казалось, прекрасно работал, пока я не переустановил Python и Pycharm:
from multiprocessing import cpu_count, Pool
num_cores = cpu_count()
pool = Pool(num_cores)
Это выдает следующую ошибку:
OSError: [Errno 22] Invalid argument: 'D:\\Dropbox\\3_Master_Program\\Master_Thesis\\1_Code\\<input>'
Traceback (most recent call last):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "<string>", line 1, in <module>
Traceback (most recent call last):
File "<string>", line 1, in <module>
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\patri\Miniconda3\envs\master_thesis\lib\multiprocessing\spawn.py", line 99, in spawn_main
File "C:\Users\patri\Miniconda3\envs\master_thesis\lib\multiprocessing\spawn.py", line 99, in spawn_main
File "C:\Users\patri\Miniconda3\envs\master_thesis\lib\multiprocessing\spawn.py", line 99, in spawn_main
File "C:\Users\patri\Miniconda3\envs\master_thesis\lib\multiprocessing\spawn.py", line 99, in spawn_main
new_handle = reduction.steal_handle(parent_pid, pipe_handle)
File "C:\Users\patri\Miniconda3\envs\master_thesis\lib\multiprocessing\reduction.py", line 87, in steal_handle
new_handle = reduction.steal_handle(parent_pid, pipe_handle)
File "C:\Users\patri\Miniconda3\envs\master_thesis\lib\multiprocessing\reduction.py", line 87, in steal_handle
new_handle = reduction.steal_handle(parent_pid, pipe_handle)
File "C:\Users\patri\Miniconda3\envs\master_thesis\lib\multiprocessing\reduction.py", line 87, in steal_handle
new_handle = reduction.steal_handle(parent_pid, pipe_handle)
File "C:\Users\patri\Miniconda3\envs\master_thesis\lib\multiprocessing\reduction.py", line 87, in steal_handle
_winapi.DUPLICATE_SAME_ACCESS | _winapi.DUPLICATE_CLOSE_SOURCE)
PermissionError : _winapi.DUPLICATE_SAME_ACCESS | _winapi.DUPLICATE_CLOSE_SOURCE)[WinError 5] Access is denied
_winapi.DUPLICATE_SAME_ACCESS | _winapi.DUPLICATE_CLOSE_SOURCE)PermissionError
_winapi.DUPLICATE_SAME_ACCESS | _winapi.DUPLICATE_CLOSE_SOURCE)
PermissionError: : [WinError 5] Access is denied[WinError 5] Access is denied
PermissionError: [WinError 5] Access is denied
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\patri\Miniconda3\envs\master_thesis\lib\multiprocessing\spawn.py", line 99, in spawn_main
new_handle = reduction.steal_handle(parent_pid, pipe_handle)
File "C:\Users\patri\Miniconda3\envs\master_thesis\lib\multiprocessing\reduction.py", line 87, in steal_handle
_winapi.DUPLICATE_SAME_ACCESS | _winapi.DUPLICATE_CLOSE_SOURCE)
PermissionError: [WinError 5] Access is denied
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\patri\Miniconda3\envs\master_thesis\lib\multiprocessing\spawn.py", line 99, in spawn_main
new_handle = reduction.steal_handle(parent_pid, pipe_handle)
File "C:\Users\patri\Miniconda3\envs\master_thesis\lib\multiprocessing\reduction.py", line 87, in steal_handle
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\patri\Miniconda3\envs\master_thesis\lib\multiprocessing\spawn.py", line 99, in spawn_main
_winapi.DUPLICATE_SAME_ACCESS | _winapi.DUPLICATE_CLOSE_SOURCE)
PermissionError: new_handle = reduction.steal_handle(parent_pid, pipe_handle)
File "C:\Users\patri\Miniconda3\envs\master_thesis\lib\multiprocessing\reduction.py", line 87, in steal_handle
[WinError 5] Access is denied
_winapi.DUPLICATE_SAME_ACCESS | _winapi.DUPLICATE_CLOSE_SOURCE)
PermissionError: [WinError 5] Access is denied
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\patri\Miniconda3\envs\master_thesis\lib\multiprocessing\spawn.py", line 99, in spawn_main
new_handle = reduction.steal_handle(parent_pid, pipe_handle)
File "C:\Users\patri\Miniconda3\envs\master_thesis\lib\multiprocessing\reduction.py", line 87, in steal_handle
_winapi.DUPLICATE_SAME_ACCESS | _winapi.DUPLICATE_CLOSE_SOURCE)
PermissionError: [WinError 5] Access is denied
У меня есть Понятия не имею, почему это происходит, и я буду признателен за любые советы. Я должен упомянуть, что я делаю это в среде conda, которую я создал.
РЕДАКТИРОВАТЬ: Очевидно, это связано с моей средой conda. В среде root эта ошибка не появляется