druid-io / pydruid

A Python connector for Druid
Other
506 stars 194 forks source link

[0.6.0] Module not found error #220

Closed Diliz closed 4 years ago

Diliz commented 4 years ago

Hello!

Saw there was a lot of modifications, even if small ones, in the last version bump, it seems the module can't be imported with a simple import pydruid, nor a from pydruid.client import *.

I got this error when trying to do so: ModuleNotFoundError: No module named 'pydruid'

It seems related to this commit: https://github.com/druid-io/pydruid/commit/f09b7afe61679536bb16b347a58ea8b4e510c1d6#diff-2eeaed663bd0d25b7e608891384b7298R26

In a new environment, just do:

pip install pydruid
echo "import pydruid" > script.py
python script.py

Used python 3.6.8 to have this error.

scottbelden commented 4 years ago

For those trying to go back to an older version as a workaround, version 0.5.11 and 0.5.10 have the same problem. It looks like 0.5.9 works.

sundeep commented 4 years ago

FWIW, 0.5.9 didn't work for us, but installing from the parent commit to the "breaking" one did.

So "pydruid@git+git://github.com/druid-io/pydruid.git@c44f36480c7c83bd29954c020585937ff753a873" , rather than "pydruid@git+git://github.com/druid-io/pydruid" in setup.py

Diliz commented 4 years ago

FWIW, 0.5.9 didn't work for us, but installing from the parent commit to the "breaking" one did.

So "pydruid@git+git://github.com/druid-io/pydruid.git@c44f36480c7c83bd29954c020585937ff753a873" , rather than "pydruid@git+git://github.com/druid-io/pydruid" in setup.py

This is a weird behavior, maybe the built and pushed package was not well built in the first place, did you try building the latest version of druid yourself to check if the commit was the real culprit? xD

DzakirinMD commented 4 years ago

For those encountering the issue, it happen with pydruid version 0.6.0. current workaround is to revert back to version0.5.9 by running pip install pydruid==0.5.9. You may refer here.

Credit to Narendra Prasath for great assistant.

mistercrunch commented 4 years ago

👀

villebro commented 4 years ago

Hi all, 0.6.1 is now out on PyPI (thanks @mistercrunch !) , and I connected Superset successfully to an Imply cluster with pydruid==0.6.1 with python versions 3.6.10, 3.7.7 and 3.8.3. If you hit any problems feel free to tag me.