Unable to import
Closed this issue · 1 comments
danvk commented
Following the instructions in the README gives me a no module found error. I'm on Python 3.6.
$ pip install os-fast-reservoir
$ python
Python 3.6.3 (default, Oct 4 2017, 06:09:15)
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.37)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from os_fast_reservoir import ReservoirSampling
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/danvk/.virtualenvs/.../lib/python3.6/site-packages/os_fast_reservoir/__init__.py", line 2, in <module>
from reservoir import ReservoirSampling
ModuleNotFoundError: No module named 'reservoir'
cfhamlet commented
It is because py3 don't support relative import.
I didn't test on py3 before.
I have fixed the problem and test on py2/3. Try it.