Error When Redeploying Python App

     Preparing metadata (pyproject.toml): started
     Preparing metadata (pyproject.toml): finished with status 'done'
   Collecting aiosignal==1.3.1 (from -r requirements.txt (line 2))
     Downloading aiosignal-1.3.1-py3-none-any.whl.metadata (4.0 kB)
   Collecting annotated-types==0.7.0 (from -r requirements.txt (line 3))
     Downloading annotated_types-0.7.0-py3-none-any.whl.metadata (15 kB)
   Collecting anyio==4.4.0 (from -r requirements.txt (line 4))
     Downloading anyio-4.4.0-py3-none-any.whl.metadata (4.6 kB)
   Collecting asgiref==3.8.1 (from -r requirements.txt (line 5))
     Downloading asgiref-3.8.1-py3-none-any.whl.metadata (9.3 kB)
   Collecting asknews==0.7.54 (from -r requirements.txt (line 6))
     Downloading asknews-0.7.54-py3-none-any.whl.metadata (2.3 kB)
   Collecting attrs==23.2.0 (from -r requirements.txt (line 7))
     Downloading attrs-23.2.0-py3-none-any.whl.metadata (9.5 kB)
   Collecting cattrs==23.2.3 (from -r requirements.txt (line 8))
     Downloading cattrs-23.2.3-py3-none-any.whl.metadata (10 kB)
   Collecting certifi==2024.6.2 (from -r requirements.txt (line 9))
     Downloading certifi-2024.6.2-py3-none-any.whl.metadata (2.2 kB)
   Collecting cffi==1.16.0 (from -r requirements.txt (line 10))
     Downloading cffi-1.16.0.tar.gz (512 kB)
     Installing build dependencies: started
     Installing build dependencies: finished with status 'done'
     Getting requirements to build wheel: started
     Getting requirements to build wheel: finished with status 'done'
     Preparing metadata (pyproject.toml): started
     Preparing metadata (pyproject.toml): finished with status 'done'
   Collecting charset-normalizer==3.3.2 (from -r requirements.txt (line 11))
     
     Preparing metadata (pyproject.toml): started
     Preparing metadata (pyproject.toml): finished with status 'error'
     error: subprocess-exited-with-error
     
     × Preparing metadata (pyproject.toml) did not run successfully.
     │ exit code: 1
     ╰─> [6 lines of output]
         Checking for Rust toolchain....
         
         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/
         
         [end of output]
     
     note: This error originates from a subprocess, and is likely not a problem with pip.
   error: metadata-generation-failed
   
   × Encountered error while generating package metadata.
   ╰─> See above for output.
   
   note: This is an issue with the package mentioned above, not pip.
   hint: See above for details.

e[1;31m ! Error: Unable to install dependencies using pip.e[0m
e[1;31m ! e[0m
e[1;31m ! See the log output above for more information.e[0m

Timer: Builder ran for 16.923204594s and ended at 2025-03-03T18:50:23Z
e[31;1mERROR: e[0mfailed to build: exit status 1
Build failed :x:

Hello @normandmickey,

Check out this reply I change a line in my code and build failed - #3 by Lukasz_Oles

It seems to be the same reason.

Thanks! I added a .python-version file and it worked.

1 Like