cannot import name shared_memory

I got a problem when trying shared memory access with python. I used multiprocessing library from Python Standard Library, but it's not worked when I try to import shared_memory module.

from multiprocessing import shared_memory


ImportError: cannot import name shared_memory

I tried with Python 2 and Python 3, and all of them have the same problem. Is there any suggestion about this problem?

1 answer

  • answered 2019-10-08 03:18 user2357112

    As of Python 3.7, multiprocessing.shared_memory is not yet actually a thing that exists. Wait for 3.8, then get 3.8. It will exist in 3.8.