Installing Rust Compiler for Flask app

I am trying to deploy a Flask/Python application with Python3.8.2 on Render. The application depends on the Python package Tokenizers, which requires a Rust compiler. Is there a way to install a Rust compiler on Render?

Apr 13 01:15:56 PM    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.
Apr 13 01:15:56 PM    ----------------------------------------
Apr 13 01:15:56 PM    ERROR: Failed building wheel for tokenizers
Apr 13 01:15:56 PM    Running setup.py clean for tokenizers
Apr 13 01:15:56 PM    ERROR: Command errored out with exit status 1:
Apr 13 01:15:56 PM     command: /opt/render/project/src/.venv/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-zqfrv5yg/tokenizers/setup.py'"'"'; __file__='"'"'/tmp/pip-install-zqfrv5yg/tokenizers/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' clean --all
Apr 13 01:15:56 PM         cwd: /tmp/pip-install-zqfrv5yg/tokenizers
Apr 13 01:15:56 PM    Complete output (17 lines):
Apr 13 01:15:56 PM    running clean
Apr 13 01:15:56 PM    removing 'build/lib.linux-x86_64-cpython-38' (and everything under it)
Apr 13 01:15:56 PM    'build/bdist.linux-x86_64' does not exist -- can't clean it
Apr 13 01:15:56 PM    'build/scripts-3.8' does not exist -- can't clean it
Apr 13 01:15:56 PM    removing 'build'

Hi,

I replied to the ticket you also opened, I’ll share the same reply here for completeness:

Rust tools aren’t available when using the Python Native Environment. If you require both Python & Rust, you might be able to install Rust as part of your Build Command. Or, to have complete control over the environment, you could use Docker.

Alan

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.