axiak / pybloomfiltermmap

Fast Python Bloom Filter using Mmap
http://axiak.github.com/pybloomfiltermmap/
MIT License
741 stars 137 forks source link

NameError: name 'exit' is not defined #65

Closed piskvorky closed 9 years ago

piskvorky commented 9 years ago

The package installs, but trying to import it crashes the interpreter:

$ python
Python 2.7.10 (default, Jul 14 2015, 19:46:27)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from pybloomfilter import BloomFilter
[-]calg library: http://c-algorithms.sourceforge.net
$

Importing from IPython survives the import, and the error is clearer:

In [1]: from pybloomfilter import BloomFilter
[-]calg library: http://c-algorithms.sourceforge.net
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-1-a89b8b011857> in <module>()
----> 1 from pybloomfilter import BloomFilter

/Volumes/work/workspace/vew/ds/lib/python2.7/site-packages/pybloomfilter.py in <module>()
     29 if calgfound is None:
     30     print "[-]calg library: http://c-algorithms.sourceforge.net"
---> 31     exit(-1)
     32 calg=CDLL(calgfound)
     33

NameError: name 'exit' is not defined

What does this error mean and how do I install pybloomfiltermmap so that it works?

This is OS X Yosemite, pybloomfiltermmap installed with pip install pybloomfiltermmap:

$ uname -a
Darwin kofola3 14.5.0 Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53 PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64
piskvorky commented 9 years ago

Hmm, I reinstall and the problem disappeared.

I'm going to close this issue now, but if you have any idea of what might have happened, please let me know!

VicThor1292 commented 7 years ago

I think you installed another package (happened to me) and that package is whether faulty or too old pybloomfiltermmap != pybloomfilter