Having trouble connecting to Databricks CLI

1.8k Views Asked by At

so I need to connect to Databricks CLI so that I could download a dbfs jar file on my local machine. To do that, I am using Databricks CLI. I tried to use this command and here's the message I got. Could you please explain why I'm getting this error and what I need to do in order to successfully connect to Databricks CLI?

C:\Users\Vedan>py -m pip install -U databricks-connect==5.5.* #command I wrote


Collecting databricks-connect==5.5.*
  Using cached databricks-connect-5.5.3.tar.gz (237.8 MB)
    ERROR: Command errored out with exit status 1:
     command: 'C:\Users\Vedan\AppData\Local\Programs\Python\Python38-32\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Vedan\\AppData\\Local\\Temp\\pip-install-u_38_c96\\databricks-connect\\setup.py'"'"'; __file__='"'"'C:\\Users\\Vedan\\AppData\\Local\\Temp\\pip-install-u_38_c96\\databricks-connect\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\Vedan\AppData\Local\Temp\pip-pip-egg-info-bqyokfsw'
         cwd: C:\Users\Vedan\AppData\Local\Temp\pip-install-u_38_c96\databricks-connect\
    Complete output (47 lines):
    Could not import pypandoc - required to package PySpark
    WARNING: The wheel package is not available.
      ERROR: Command errored out with exit status 1:
       command: 'C:\Users\Vedan\AppData\Local\Programs\Python\Python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Vedan\\AppData\\Local\\Temp\\pip-wheel-drn6k8ho\\pypandoc\\setup.py'"'"'; __file__='"'"'C:\\Users\\Vedan\\AppData\\Local\\Temp\\pip-wheel-drn6k8ho\\pypandoc\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\Vedan\AppData\Local\Temp\pip-wheel-q1to7105'
           cwd: C:\Users\Vedan\AppData\Local\Temp\pip-wheel-drn6k8ho\pypandoc\
      Complete output (8 lines):
      no pandoc found, building platform unspecific wheel...
      use 'python setup.py download_pandoc' to download pandoc.
      usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
         or: setup.py --help [cmd1 cmd2 ...]
         or: setup.py --help-commands
         or: setup.py cmd --help

      error: invalid command 'bdist_wheel'
      ----------------------------------------
      ERROR: Failed building wheel for pypandoc
    ERROR: Failed to build one or more wheels
    Traceback (most recent call last):
      File "C:\Users\Vedan\AppData\Local\Programs\Python\Python38-32\lib\site-packages\setuptools\installer.py", line 128, in fetch_build_egg
        subprocess.check_call(cmd)
      File "C:\Users\Vedan\AppData\Local\Programs\Python\Python38-32\lib\subprocess.py", line 364, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['C:\\Users\\Vedan\\AppData\\Local\\Programs\\Python\\Python38-32\\python.exe', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', 'C:\\Users\\Vedan\\AppData\\Local\\Temp\\tmplpeqb0pi', '--quiet', 'pypandoc']' returned non-zero exit status 1.

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\Vedan\AppData\Local\Temp\pip-install-u_38_c96\databricks-connect\setup.py", line 210, in <module>
        setup(
      File "C:\Users\Vedan\AppData\Local\Programs\Python\Python38-32\lib\site-packages\setuptools\__init__.py", line 143, in setup
        _install_setup_requires(attrs)
      File "C:\Users\Vedan\AppData\Local\Programs\Python\Python38-32\lib\site-packages\setuptools\__init__.py", line 138, in _install_setup_requires
        dist.fetch_build_eggs(dist.setup_requires)
      File "C:\Users\Vedan\AppData\Local\Programs\Python\Python38-32\lib\site-packages\setuptools\dist.py", line 695, in fetch_build_eggs
        resolved_dists = pkg_resources.working_set.resolve(
      File "C:\Users\Vedan\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pkg_resources\__init__.py", line 781, in resolve
        dist = best[req.key] = env.best_match(
      File "C:\Users\Vedan\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pkg_resources\__init__.py", line 1066, in best_match
        return self.obtain(req, installer)
      File "C:\Users\Vedan\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pkg_resources\__init__.py", line 1078, in obtain
        return installer(requirement)
      File "C:\Users\Vedan\AppData\Local\Programs\Python\Python38-32\lib\site-packages\setuptools\dist.py", line 754, in fetch_build_egg
        return fetch_build_egg(self, req)
      File "C:\Users\Vedan\AppData\Local\Programs\Python\Python38-32\lib\site-packages\setuptools\installer.py", line 130, in fetch_build_egg
        raise DistutilsError(str(e))
    distutils.errors.DistutilsError: Command '['C:\\Users\\Vedan\\AppData\\Local\\Programs\\Python\\Python38-32\\python.exe', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', 'C:\\Users\\Vedan\\AppData\\Local\\Temp\\tmplpeqb0pi', '--quiet', 'pypandoc']' returned non-zero exit status 1.
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
1

There are 1 best solutions below

0
On BEST ANSWER

You might have to install the wheel package prior to install databricks-cli.

Try

pip install wheel

and then retry installing databricks-cli