无法在 Azure Databricks 中通过 PyPi 安装 python 包

Cannot install python packages thorugh PyPi in Azure Databricks

我想通过 Python 从 Databricks Notebook 调用网络服务。为此所需的库似乎是 http.client.

我已经找到了一个代码片段来测试它,但是当我尝试执行它时,我收到以下错误:

ImportError: No module named http.client

这是正确的,因为我还没有安装模块。

在下一步中,我转到我的 Databricks 中的一个文件夹,select 导入 -> 导入笔记本对话框单击 (To import a library, such as a jar or egg, click here) -> Select 在 Language DropDown Upload Python Egg or PyPI -> in pyPI name typehttp.client` 然后点击 Install Library。

然后我selectAttach automatically to all clusters.

我收到以下错误:

Error: java.lang.RuntimeException: Installation failed with message: Collecting http.client Collecting http.client Could not find a version that satisfies the requirement http.client (from versions: ) No matching distribution found for http.client You are using pip version 9.0.1, however version 18.0 is available. You should consider upgrading via the 'pip install --upgrade pip' command. Could not find a version that satisfies the requirement http.client (from versions: ) No matching distribution found for http.client You are using pip version 9.0.1, however version 18.0 is available. You should consider upgrading via the 'pip install --upgrade pip' command.

我该如何解决这个问题?

能否导入httplib,一定能解决问题