ERROR: Could not build wheels for pandas, cryptography which use PEP 517 and cannot be installed directly (error: can't find Rust compiler) → インストールするだけ


# Error

```bash
make install # 内部で pip install -r requirements.txt
...
  writing manifest file 'src/cryptography.egg-info/SOURCES.txt'
  copying src/cryptography/py.typed -> build/lib.macosx-11.4-x86_64-3.7/cryptography
  creating build/lib.macosx-11.4-x86_64-3.7/cryptography/hazmat/bindings/_rust
  copying src/cryptography/hazmat/bindings/_rust/__init__.pyi -> build/lib.macosx-11.4-x86_64-3.7/cryptography/hazmat/bindings/_rust
  copying src/cryptography/hazmat/bindings/_rust/asn1.pyi -> build/lib.macosx-11.4-x86_64-3.7/cryptography/hazmat/bindings/_rust
  copying src/cryptography/hazmat/bindings/_rust/ocsp.pyi -> build/lib.macosx-11.4-x86_64-3.7/cryptography/hazmat/bindings/_rust
  copying src/cryptography/hazmat/bindings/_rust/x509.pyi -> build/lib.macosx-11.4-x86_64-3.7/cryptography/hazmat/bindings/_rust
  running build_ext
  generating cffi module 'build/temp.macosx-11.4-x86_64-3.7/_openssl.c'
  creating build/temp.macosx-11.4-x86_64-3.7
  running build_rust
  
      =============================DEBUG ASSISTANCE=============================
      If you are seeing a compilation error please try the following steps to
      successfully install cryptography:
      1) Upgrade to the latest pip and try again. This will fix errors for most
         users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip
      2) Read https://cryptography.io/en/latest/installation/ for specific
         instructions for your platform.
      3) Check our frequently asked questions for more information:
         https://cryptography.io/en/latest/faq/
      4) Ensure you have a recent Rust toolchain installed:
         https://cryptography.io/en/latest/installation/#rust
  
      Python: 3.7.9
      platform: Darwin-20.5.0-x86_64-i386-64bit
      pip: n/a
      setuptools: 58.5.3
      setuptools_rust: 0.12.1
      =============================DEBUG ASSISTANCE=============================
  
  error: can't find Rust compiler
  
  If you are using an outdated pip version, it is possible a prebuilt wheel is available for this package but pip is not able to install from it. Installing from the wheel would avoid the need for a Rust compiler.
  
  To update pip, run:
  
      pip install --upgrade pip
  
  and then retry package installation.
  
  If you did intend to build this package from source, try installing a Rust compiler from your system package manager and ensure it is on the PATH during installation. Alternatively, rustup (available at https://rustup.rs) is the recommended way to download and update the Rust compiler toolchain.
  
  This package requires Rust >=1.41.0.
  ----------------------------------------
  ERROR: Failed building wheel for cryptography

Failed to build pandas cryptography
ERROR: Could not build wheels for pandas, cryptography which use PEP 517 and cannot be installed directly
WARNING: You are using pip version 20.1.1; however, version 21.3.1 is available.
You should consider upgrading via the '/Users/masato-naka/xxxxxxx/.venv/bin/python3 -m pip install --upgrade pip' command.
make: *** [install] Error 1
```

# 原因

よく見たら`can't find Rust compiler` となってる

# 解決法

単純にインストールする

https://www.rust-lang.org/tools/install


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

<details><div><summary>詳細</summary>

```bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
info: downloading installer

Welcome to Rust!

This will download and install the official compiler for the Rust
programming language, and its package manager, Cargo.

Rustup metadata and toolchains will be installed into the Rustup
home directory, located at:

  /Users/masato-naka/.rustup

This can be modified with the RUSTUP_HOME environment variable.

The Cargo home directory located at:

  /Users/masato-naka/.cargo

This can be modified with the CARGO_HOME environment variable.

The cargo, rustc, rustup and other commands will be added to
Cargo's bin directory, located at:

  /Users/masato-naka/.cargo/bin

This path will then be added to your PATH environment variable by
modifying the profile files located at:

  /Users/masato-naka/.profile
  /Users/masato-naka/.zshenv

You can uninstall at any time with rustup self uninstall and
these changes will be reverted.

Current installation options:


   default host triple: x86_64-apple-darwin
     default toolchain: stable (default)
               profile: default
  modify PATH variable: yes

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

info: profile set to 'default'
info: default host triple is x86_64-apple-darwin
info: syncing channel updates for 'stable-x86_64-apple-darwin'
info: latest update on 2021-11-01, rust version 1.56.1 (59eed8a2a 2021-11-01)
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
 17.3 MiB /  17.3 MiB (100 %)   9.6 MiB/s in  1s ETA:  0s
info: downloading component 'rust-std'
 22.0 MiB /  22.0 MiB (100 %)   9.8 MiB/s in  2s ETA:  0s
info: downloading component 'rustc'
 62.2 MiB /  62.2 MiB (100 %)   8.9 MiB/s in  6s ETA:  0s
info: downloading component 'rustfmt'
info: installing component 'cargo'
info: installing component 'clippy'
info: installing component 'rust-docs'
 17.3 MiB /  17.3 MiB (100 %)   5.2 MiB/s in  3s ETA:  0s
info: installing component 'rust-std'
 22.0 MiB /  22.0 MiB (100 %)  11.8 MiB/s in  1s ETA:  0s
info: installing component 'rustc'
 62.2 MiB /  62.2 MiB (100 %)  13.6 MiB/s in  4s ETA:  0s
info: installing component 'rustfmt'
info: default toolchain set to 'stable-x86_64-apple-darwin'

  stable-x86_64-apple-darwin installed - rustc 1.56.1 (59eed8a2a 2021-11-01)


Rust is installed now. Great!

To get started you may need to restart your current shell.
This would reload your PATH environment variable to include
Cargo's bin directory ($HOME/.cargo/bin).

To configure your current shell, run:
source $HOME/.cargo/env
```

</div></details>

当たり前すぎる解決方法だったが…

今のシェルでそのままやる場合には、これを忘れずに！

```
source $HOME/.cargo/env
```