geventconnpool icon indicating copy to clipboard operation
geventconnpool copied to clipboard

ModuleNotFoundError: No module named 'pool'

Open homuraLan opened this issue 3 years ago • 0 comments

Can it connect locally?

I use it like this:

class MyPool(ConnectionPool):
    def _new_connection(self):
        s = socket.create_connection(('192.168.0.92', 8090))
        s._sock.setsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1)
        return s

pools = MyPool(2)
with pools.get() as c:
    while True:
        print(c.recv(94).hex())

Prompt when I use: Python3.8.10x64\lib\site-packages\geventconnpool_init_.py", line 5, in from pool import ConnectionPool, retry ModuleNotFoundError: No module named 'pool'


When I execute “pip install pool”:  

File "D:\Python3.8.10x64\lib\site-packages\geventconnpool_init_.py", line 5, in from pool import ConnectionPool, retry ImportError: cannot import name 'ConnectionPool' from 'pool' (D:\Python3.8.10x64\lib\site-packages\pool_init_.py)

Looking forward to your answer,thank

homuraLan avatar Jul 21 '22 09:07 homuraLan