Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Result

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?

like image 212
Eko Rudiawan Avatar asked Oct 08 '19 03:10

Eko Rudiawan


1 Answers

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.

like image 121
user2357112 supports Monica Avatar answered Nov 03 '22 11:11

user2357112 supports Monica