python错误中的paths并行处理

python错误中的paths并行处理,python,parallel-processing,parallel-python,Python,Parallel Processing,Parallel Python,在python中尝试并行处理时,不断出现此错误: An error has occured during the function import Traceback (most recent call last): File "/home/runner/.site-packages/ppft/__main__.py", line 100, in run six.exec_(__fobj) File "<string>", line 46, in <mod

在python中尝试并行处理时,不断出现此错误:

    An error has occured during the function import
Traceback (most recent call last):
 File "/home/runner/.site-packages/ppft/__main__.py", line 100, in 
run
    six.exec_(__fobj)
  File "<string>", line 46, in <module>
ModuleNotFoundError: No module named 'ppft.exceptions'
A fatal error has occured during the function execution
Traceback (most recent call last):
  File "/home/runner/.site-packages/ppft/__main__.py", line 109, 
in run
    __f = locals()[ppc.str_(__fname)]
KeyError: 'run_test'

有人能帮我理解这个错误/问题吗

您在哪个操作系统上运行代码(Windows与Linux/Mac在使用多处理时确实会有所不同)?另外:您是否有名为
ppft
的模块/软件包?使用库的相同名称并最终导致错误是一个常见的错误,因为代码导入了错误的文件…@GiacomoAlzetta我在Linux上使用的是Python 3.6.1。我想是的——当我输入帮助(“模块”)时,ppft被列出。不太清楚你最后一句话的意思。。我什么时候会使用同一个图书馆?我是否需要以某种方式删除ppft?(如果这些都是愚蠢的问题,很抱歉。这是一个非常新的问题&非常感谢您的帮助!)我无法在Mac上用一个空的
run\u test
复制此错误。
from pathos.pools import ParallelPool as Pool
urls = ["https://www.baidu.com", "https://google.com/"]

def run_test(url):
    #getting and storing a bunch of JSON data from urls in here
    #content here did not produce errors when doing single process

pool =  Pool(4)
print(pool.map(run_test, urls))
pool.close() 
pool.join()