Cannot import name _args_from_interpreter_flags

后端 未结 1 560
名媛妹妹
名媛妹妹 2021-01-12 01:18

When I try to import multiprocessing in Python 2.7.5 on OS X 10.6.8, I get this error:

Traceback (most recent call last):
File \"\"         


        
相关标签:
1条回答
  • 2021-01-12 01:30

    It sounds like a circular import issue. Try adding this to the the rest of your imports:

    from subprocess import _args_from_interpreter_flags
    

    There is a comment above the function in subprocess.py:

    # XXX This function is only used by multiprocessing and the test suite,
    # but it's here so that it can be imported when Python is compiled without
    # threads.
    

    May be related.

    0 讨论(0)
提交回复
热议问题