Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not detecting installed numpy after installing turbodbc 4.5.6 with Python 3.11 #374

Closed
swolfe2 opened this issue Jan 19, 2023 · 1 comment
Labels

Comments

@swolfe2
Copy link

swolfe2 commented Jan 19, 2023

After upgrading Python to 3.11, and reinstalling all packages I need, turbodbc no longer detects that numpy is installed. It now has this message in the terminal:
Failed to upload: This installation of turbodbc does not support NumPy extensions. Please install the 'numpy' package. If you have built turbodbc from source, you may also need to reinstall turbodbc to compile the extensions.

The code fails when trying to insert values with cursor:

  # writing sql query for turbodbc
  sql = f"""
  INSERT INTO {DB_NAME}.{temp_table} {columns}
  VALUES {sql_val}
  """

  # inserts data
  with conn.cursor() as cursor:
      try:
          cursor.executemanycolumns(sql, values)
          conn.commit()
      except Exception as e:
          conn.rollback()
          print("Failed to upload: " + str(e))

Full package list from documentation:
image

I have attempted pip uninstall/install numpy/arrow/turbodbc per the instructions.

When executing turbodbc on Python 3.10.9, I do not encounter this issue at all with the same package versions.

@swolfe2
Copy link
Author

swolfe2 commented Mar 6, 2023

Just attempted again with turbodbc 4.5.10, and this issue appears to have been resolved.

@swolfe2 swolfe2 closed this as completed Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants