implementing pyshark

Steven D'Aprano steve+comp.lang.python at pearwood.info
Mon Apr 6 20:55:47 EDT 2015


On Mon, 6 Apr 2015 10:45 pm, Michael S. wrote:

> I am using kali-linux(debian based). i have installed all from
> repository. i haven't tried yet to use the source but i don't think it
> was compiled incorrectly. Kali's developers are quite precise in terms
> of OS development.

What happens if you import threading?


If it returns without failure, then your Python interpreter is built
correctly with support for threading, and my guess was wrong.

If you get an error about no module _threading (or possibly _thread, I
forget which) then it is built without support for threading.

But, I'm now leaning towards thinking that Peter Otten's answer is more
likely. It seems to be gevent._threading that is missing. It wasn't
entirely clear from your original post, but in looking back I think Peter
is correct.

You should check whether you are accidentally shadowing gevent:

import gevent
print(gevent.__file__)


If that prints the file name of the actual gevent library, then it is
possible that you have a broken or outdated version of the library.

But if it is a file you have created, then you are shadowing the gevent
library, blocking Python from importing the library, it imports your
version instead. Rename your gevent.py file and the problem will hopefully
go away.



-- 
Steven




More information about the Python-list mailing list