smartgic / docker-mycroft

Mycroft AI Voice Assistant Docker images and docker-compose.yml files for x86_64, arm7vl and aarch64 CPU architectures.
https://hub.docker.com/u/smartgic
Apache License 2.0
41 stars 8 forks source link

error: can't find Rust compiler #14

Closed goldyfruit closed 3 years ago

goldyfruit commented 3 years ago

During first start of mycroft_skills Docker container (before the pairing), this error appears in the log even if CRYPTOGRAPHY_DONT_BUILD_RUST is set to 1.

        running build_ext
        generating cffi module 'build/temp.linux-aarch64-3.7/_openssl.c'
        creating build/temp.linux-aarch64-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.3
            platform: Linux-5.10.0-v8+-aarch64-with-debian-10.11
            pip: 18.1
            setuptools: 58.3.0
            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.

        ----------------------------------------

      Failed building wheel for cryptography
      Failed cleaning build dir for cryptography
    Command "/opt/mycroft-venv/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-36ll0cuj/cryptography/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-bbin2vw0/install-record.txt --single-version-externally-managed --compile --install-headers /opt/mycroft-venv/include/site/python3.7/cryptography" failed with error code 1 in /tmp/pip-install-36ll0cuj/cryptography/
)
goldyfruit commented 3 years ago

Fixed by commit f25137c179b084d35a3c358daa2d3114cbe9ab92

Collecting pip
  Downloading https://files.pythonhosted.org/packages/a4/6d/6463d49a933f547439d6b5b98b46af8742cc03ae83543e4d7688c2420f8b/pip-21.3.1-py3-none-any.whl (1.7MB)
    100% |████████████████████████████████| 1.7MB 338kB/s 
Installing collected packages: pip
  Found existing installation: pip 18.1
    Uninstalling pip-18.1:
      Successfully uninstalled pip-18.1
Successfully installed pip-21.3.1