When pypika and pypika-tortoise are both installed, both are installed within the same site-packages directory (see https://github.com/tortoise/pypika-tortoise/issues/5). This causes an ImportError, because dialects/__init__.py is imported by upstream pypika's __init__.py, instead of its own dialects.py:
File "/myproject/.venv/lib/python3.10/site-packages/tortoise/__init__.py", line 11, <module>
from pypika import Table
File "/myproject/.venv/lib/python3.10/site-packages/pypika/__init__.py", line 34, <module>
from pypika.dialects import (
dialects: <module 'pypika.dialects' from '/myproject/.venv/lib/python3.10/site-packages/pypika/dialects/__init__.py'>
ImportError:
cannot import name 'ClickHouseQuery' from 'pypika.dialects' (/myproject/.venv/lib/python3.10/site-packages/pypika/dialects/__init__.py)
Please rename this package.
And if you've watched "the Fly", you'll know the disastrous consequences of merging two species 😉 .
When
pypika
andpypika-tortoise
are both installed, both are installed within the same site-packages directory (see https://github.com/tortoise/pypika-tortoise/issues/5). This causes anImportError
, becausedialects/__init__.py
is imported by upstreampypika
's__init__.py
, instead of its owndialects.py
:Please rename this package.
And if you've watched "the Fly", you'll know the disastrous consequences of merging two species 😉 .