You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Error] numpy: cannot import name 'Connection' from partially initialized module 'databricks.sql.client' #25
Traceback (most recent call last):
File "/Users/apoclyps/workspace/src/select.py", line 4, in<module>
with sql.connect(
File "/Users/apoclyps/.pyenv/versions/3.10.3/lib/python3.10/site-packages/databricks/sql/__init__.py", line 47, in connect
from .client import Connection
File "/Users/apoclyps/.pyenv/versions/3.10.3/lib/python3.10/site-packages/databricks/sql/client.py", line 8, in<module>
import pandas
File "/Users/apoclyps/.pyenv/versions/3.10.3/lib/python3.10/site-packages/pandas/__init__.py", line 16, in<module>
raise ImportError(
ImportError: Unable to import required dependencies:
numpy: cannot import name 'Connection' from partially initialized module 'databricks.sql.client' (most likely due to a circular import) (/Users/apoclyps/.pyenv/versions/3.10.3/lib/python3.10/site-packages/databricks/sql/client.py)
I believe the issue is caused by the following * import causing a circular import between databricks.sql and databricks.sql.client in databricks/sql/client.py
Thanks for opening this issue. It's not a circular import. Our connector depends on numpy which only added support for Python 3.10 on 22 June 22 in version 1.23.0. But we’re pinned to 1.21.1. I've created #26 to track the effort to implement support for Python 3.10.
For now the only mitigation is to use Python 3.7 - 3.9.
Activity
susodapop commentedon Aug 1, 2022
Thanks for opening this issue. It's not a circular import. Our connector depends on
numpywhich only added support for Python 3.10 on 22 June 22 in version 1.23.0. But we’re pinned to 1.21.1. I've created #26 to track the effort to implement support for Python 3.10.For now the only mitigation is to use Python 3.7 - 3.9.
[edit] I'm closing this issue in favour of #26.