简体   繁体   English

如何在 Databricks 上安装 Cargo、Rust 包管理器

[英]How to install Cargo, Rust package manager on Databricks

I'm trying to install Vaex with !pip install vaex on a cluster on Databricks, but the installation is failing because it has a dependency called blake3, which needs Cargo.我正在尝试在 Databricks 上的集群上使用!pip install vaex Vaex,但安装失败,因为它有一个名为 blake3 的依赖项,它需要 Cargo。

Collecting blake3
  Using cached blake3-0.3.1.tar.gz (131 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]
      
      Cargo, the Rust package manager, is not installed or is not on PATH.
      This package requires Rust and Cargo to compile extensions. Install it through
      the system's package manager or via https://rustup.rs/
      
      Checking for Rust toolchain....
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

Going to the redirected link has a command to install Cargo转到重定向的链接有一个安装 Cargo 的命令

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

But running it on a Databricks python notebook doesn't work because it is an interactive shell command which needs an input to be given.但是在 Databricks python notebook 上运行它是行不通的,因为它是一个需要输入的交互式 shell 命令。

Current installation options:


   default host triple: aarch64-unknown-linux-gnu
     default toolchain: stable (default)
               profile: default
  modify PATH variable: yes

1) Proceed with installation (default)
2) Customize installation
3) Cancel installation

I have tried curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -1我试过curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -1 curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -1 but it throws an illegal option error curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -1但它会引发非法选项错误

rustup-init 1.22.1 (76644d669 2020-07-08)
The installer for rustup

USAGE:
    rustup-init [FLAGS] [OPTIONS]

FLAGS:
    -v, --verbose           Enable verbose output
    -q, --quiet             Disable progress output
    -y                      Disable confirmation prompt.
        --no-modify-path    Don't configure the PATH environment variable
    -h, --help              Prints help information
    -V, --version           Prints version information

OPTIONS:
        --default-host <default-host>              Choose a default host triple
        --default-toolchain <default-toolchain>    Choose a default toolchain to install
        --default-toolchain none                   Do not install any toolchains
        --profile [minimal|default|complete]       Choose a profile
    -c, --component <components>...                Component name to also install
    -t, --target <targets>...                      Target name to also install

you can use -y to Disable confirmation prompt.您可以使用 -y 禁用确认提示。

like this像这样

curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf > rustup.sh
sh rustup.sh -y
sudo bash -c "echo source $HOME/.cargo/env >> /etc/bash.bashrc"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在虚拟环境中安装 pip 的问题 - Cargo,Rust package 管理器,未安装或不在 PATH 上 - Issue with pip install in virtual environment - Cargo, the Rust package manager, is not installed or is not on PATH 如何在Databricks中安装python包&#39;rpy2&#39;? - How to install python package 'rpy2' in Databricks? 如何在 Windows 上安装 OpenCV 并在不使用包管理器的情况下为 PyCharm 启用它 - How to install OpenCV on Windows and enable it for PyCharm without using the package manager 我如何像包管理器那样安装python脚本呢? - How do i install a python script like package manager does? 如何在databricks集群上安装gdal? - How to install gdal on databricks cluster? pip-install Python Package 来自 Databricks 集群上的 Azure Artefact - pip-install Python Package from Azure Artefact on a Databricks Cluster 机盖包管理器安装按钮丢失 - Canopy package manager install button missing 如何在 Azure Databricks 集群上安装 gurobi 库? - How to install gurobi library on Azure Databricks cluster? 决定使用哪个 package 管理器来安装 Python package - Deciding which package manager was used to install a Python package Python 错误出现在 Rust Cargo - Python errors show up with Rust Cargo
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM