0

In my Python notebook in Azure Databricks, the following import statement gives the error shown below. It seems I am missing some package.

What package am I missing, and how can I install it?

Ref: This post. Please note this linked post is using Scala, but I am using Python as I don't know Scala.

import java.sql.DriverManager

Error:

ModuleNotFoundError: No module named 'java'

4

1 Answer 1

0

There is no java package you can install for CPython (with no modifier, Python refers to CPython); Run the code in Jython rather than CPython.

Jython integrates with Java and lets you import packages in Java's java.* namespace, such as java.sql.DriverManager. See here for more details.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.