1

我已经在 Ubuntu 16.04 和 Mac 上成功安装了 databricks cli。当我尝试在 Ubuntu 18.04 (Azure VM) 上安装它时,它看起来运行良好,然后当我尝试调用 cli 工具时它没有安装。我让它在 Ubuntu 16.04 和 OSX 上运行良好。有什么想法让这个工作吗?输出复制如下

vstsTestLogin@PensDataScienceVSTS:~$ pip install databricks-cli
Collecting databricks-cli
Using cached 

https://files.pythonhosted.org/packages/de/8f/b0b5222c910eafb4dd6cc6de04d7821e6caefb5a9d927bc68c39206e422f/databricks_cli-0.8.2-py2-none-any.whl
Collecting tabulate>=0.7.7 (from databricks-cli)
Collecting configparser>=0.3.5 (from databricks-cli)
Collecting click>=6.7 (from databricks-cli)
  Using cached https://files.pythonhosted.org/packages/34/c1/8806f99713ddb993c5366c362b2f908f18269f8d792aff1abfd700775a77/click-6.7-py2.py3-none-any.whl
Collecting six>=1.10.0 (from databricks-cli)
  Using cached https://files.pythonhosted.org/packages/67/4b/141a581104b1f6397bfa78ac9d43d8ad29a7ca43ea90a2d863fe3056e86a/six-1.11.0-py2.py3-none-any.whl
Collecting requests>=2.17.3 (from databricks-cli)
  Using cached https://files.pythonhosted.org/packages/65/47/7e02164a2a3db50ed6d8a6ab1d6d60b69c4c3fdf57a284257925dfc12bda/requests-2.19.1-py2.py3-none-any.whl
Collecting idna<2.8,>=2.5 (from requests>=2.17.3->databricks-cli)
  Using cached https://files.pythonhosted.org/packages/4b/2a/0276479a4b3caeb8a8c1af2f8e4355746a97fab05a372e4a2c6a6b876165/idna-2.7-py2.py3-none-any.whl
Collecting certifi>=2017.4.17 (from requests>=2.17.3->databricks-cli)
  Using cached https://files.pythonhosted.org/packages/df/f7/04fee6ac349e915b82171f8e23cee63644d83663b34c539f7a09aed18f9e/certifi-2018.8.24-py2.py3-none-any.whl
Collecting chardet<3.1.0,>=3.0.2 (from requests>=2.17.3->databricks-cli)
  Using cached https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl
Collecting urllib3<1.24,>=1.21.1 (from requests>=2.17.3->databricks-cli)
  Using cached https://files.pythonhosted.org/packages/bd/c9/6fdd990019071a4a32a5e7cb78a1d92c53851ef4f56f62a3486e6a7d8ffb/urllib3-1.23-py2.py3-none-any.whl
Installing collected packages: tabulate, configparser, click, six, idna, certifi, chardet, urllib3, requests, databricks-cli
Successfully installed certifi-2018.8.24 chardet-3.0.4 click-6.7 configparser-3.5.0 databricks-cli-0.8.2 idna-2.7 requests-2.19.1 six-1.11.0 tabulate-0.8.2 urllib3-1.23
vstsTestLogin@PensDataScienceVSTS:~$ databricks
databricks: command not found


vstsTestLogin@PensDataScienceVSTS:~$ python -V
Python 2.7.15rc1


vstsTestLogin@PensDataScienceVSTS:~$ pip install databricks-cli --no-cache-dir
Collecting databricks-cli
  Downloading https://files.pythonhosted.org/packages/de/8f/b0b5222c910eafb4dd6cc6de04d7821e6caefb5a9d927bc68c39206e422f/databricks_cli-0.8.2-py2-none-any.whl (76kB)
    100% |████████████████████████████████| 81kB 4.5MB/s 
Collecting tabulate>=0.7.7 (from databricks-cli)
  Downloading https://files.pythonhosted.org/packages/12/c2/11d6845db5edf1295bc08b2f488cf5937806586afe42936c3f34c097ebdc/tabulate-0.8.2.tar.gz (45kB)
    100% |████████████████████████████████| 51kB 11.1MB/s 
Collecting configparser>=0.3.5 (from databricks-cli)
  Downloading https://files.pythonhosted.org/packages/7c/69/c2ce7e91c89dc073eb1aa74c0621c3eefbffe8216b3f9af9d3885265c01c/configparser-3.5.0.tar.gz
Collecting click>=6.7 (from databricks-cli)
  Downloading https://files.pythonhosted.org/packages/34/c1/8806f99713ddb993c5366c362b2f908f18269f8d792aff1abfd700775a77/click-6.7-py2.py3-none-any.whl (71kB)
    100% |████████████████████████████████| 71kB 10.9MB/s 
Collecting six>=1.10.0 (from databricks-cli)
  Downloading https://files.pythonhosted.org/packages/67/4b/141a581104b1f6397bfa78ac9d43d8ad29a7ca43ea90a2d863fe3056e86a/six-1.11.0-py2.py3-none-any.whl
Collecting requests>=2.17.3 (from databricks-cli)
  Downloading https://files.pythonhosted.org/packages/65/47/7e02164a2a3db50ed6d8a6ab1d6d60b69c4c3fdf57a284257925dfc12bda/requests-2.19.1-py2.py3-none-any.whl (91kB)
    100% |████████████████████████████████| 92kB 9.2MB/s 
Collecting idna<2.8,>=2.5 (from requests>=2.17.3->databricks-cli)
  Downloading https://files.pythonhosted.org/packages/4b/2a/0276479a4b3caeb8a8c1af2f8e4355746a97fab05a372e4a2c6a6b876165/idna-2.7-py2.py3-none-any.whl (58kB)
    100% |████████████████████████████████| 61kB 11.0MB/s 
Collecting certifi>=2017.4.17 (from requests>=2.17.3->databricks-cli)
  Downloading https://files.pythonhosted.org/packages/df/f7/04fee6ac349e915b82171f8e23cee63644d83663b34c539f7a09aed18f9e/certifi-2018.8.24-py2.py3-none-any.whl (147kB)
    100% |████████████████████████████████| 153kB 9.6MB/s 
Collecting chardet<3.1.0,>=3.0.2 (from requests>=2.17.3->databricks-cli)
  Downloading https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl (133kB)
    100% |████████████████████████████████| 143kB 9.4MB/s 
Collecting urllib3<1.24,>=1.21.1 (from requests>=2.17.3->databricks-cli)
  Downloading https://files.pythonhosted.org/packages/bd/c9/6fdd990019071a4a32a5e7cb78a1d92c53851ef4f56f62a3486e6a7d8ffb/urllib3-1.23-py2.py3-none-any.whl (133kB)
    100% |████████████████████████████████| 143kB 11.3MB/s 
Installing collected packages: tabulate, configparser, click, six, idna, certifi, chardet, urllib3, requests, databricks-cli
  Running setup.py install for tabulate ... done
  Running setup.py install for configparser ... done
Successfully installed certifi-2018.8.24 chardet-3.0.4 click-6.7 configparser-3.5.0 databricks-cli-0.8.2 idna-2.7 requests-2.19.1 six-1.11.0 tabulate-0.8.2 urllib3-1.23
vstsTestLogin@PensDataScienceVSTS:~$ databricks
databricks: command not found
vstsTestLogin@PensDataScienceVSTS:~$ 
4

2 回答 2

10

确保 pip 用于安装 databricks-cli 的目录包含在您的 PATH 环境变量中。

例如,在我的 Ubuntu 18.04 系统上,pip 将“databricks”脚本安装到 ~/.local/bin目录中。

您还可以--user在调用时使用该标志pip install以确保它将软件包安装在您的主目录下

所以总结一下:

将以下行添加到 .bashrc

export PATH=$PATH:$HOME/.local/bin

然后运行

source ~/.bashrc
pip install --user databricks-cli
databricks --version
于 2019-05-04T12:04:34.453 回答
-1

我有同样的问题,解决方案是重新启动机器。

于 2019-02-13T08:52:44.430 回答