Python 简单的多进程 报错,求助各位大佬?
import multiprocessing as mpdef test(que,a,b):
r=a+b
que.put(r)
if __name__ == '__main__':
f = 1
g = 1
t = mp.Queue()
k = mp.Process(target=test,args=(t,f,g))
k.start()
k.join()
u = t.get()
Traceback (most recent call last): File "<string>", line 1, in <module>
File "C:\Users\admin\AppData\Local\Programs\Python\Python39\lib\multiprocessing\spawn.py", line 116, in spawn_main
exitcode = _main(fd, parent_sentinel)
File "C:\Users\admin\AppData\Local\Programs\Python\Python39\lib\multiprocessing\spawn.py", line 125, in _main
prepare(preparation_data)
File "C:\Users\admin\AppData\Local\Programs\Python\Python39\lib\multiprocessing\spawn.py", line 236, in prepare
_fixup_main_from_path(data['init_main_from_path'])
File "C:\Users\admin\AppData\Local\Programs\Python\Python39\lib\multiprocessing\spawn.py", line 287, in _fixup_main_from_path
main_content = runpy.run_path(main_path,
File "C:\Users\admin\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 267, in run_path
code, fname = _get_code_from_file(run_name, path_name)
File "C:\Users\admin\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 237, in _get_code_from_file
with io.open_code(decoded_path) as f:
OSError: [Errno 22] Invalid argument: 'C:\\Users\\admin\\Desktop\\销售绩效等级\\<input>'
以上是 Python 简单的多进程 报错,求助各位大佬? 的全部内容, 来源链接: utcz.com/p/938316.html