ResolvePackageNotFound: error with environment.yml while deploying

This is the error traceback

ResolvePackageNotFound: 

  - torchaudio==0.11.0

  - cpuonly

  - torchvision==0.12.0

  - pytorch==1.11.0


[18:42:12] ❗️ installer returned a non-zero exit code

[18:42:12] ❗️ Error during processing dependencies! Please fix the error and push an update, or try restarting the app.

[18:43:46] ❗️ Streamlit server consistently failed status checks

[18:43:46] ❗️ Please fix the errors, push an update to the git repo, or reboot the app.

Here’s the link to the corresponding GitHub Repo.

I’d really appreciate if someone can lay out the correct way of creating these requirement files. In my case, I have installations using both conda and pip, hence using the yml file.

Hi @raj26000, welcome to the Streamlit community!

I would guess you need to add the pytorch channel as shown in this example:

Best,
Randy

Made the change, got a different error this time:

Pip subprocess output:


failed

Pip subprocess error:

ERROR: Invalid requirement: '=' (from line 10 of /app/essay-argument-effectiveness/condaenv.zq42oexv.requirements.txt)

Hint: = is not a valid operator. Did you mean == ?



CondaEnvException: Pip failed


[04:36:40] ❗️ installer returned a non-zero exit code

[04:36:40] ❗️ Error during processing dependencies! Please fix the error and push an update, or try restarting the app.

[04:38:14] ❗️ Streamlit server consistently failed status checks

[04:38:14] ❗️ Please fix the errors, push an update to the git repo, or reboot the app.

Hi @raj26000 :wave:

When pinning conda dependencies, use a single = rather than == here:

Hey @snehankekre
The same error persists despite making the change -

ERROR: Invalid requirement: '=' (from line 14 of /app/essay-argument-effectiveness/condaenv.4cnyzstx.requirements.txt)

Hint: = is not a valid operator. Did you mean == ?

The pip dependencies are improperly formatted. Namely, they’re missing the - before the package name.

Here’s an example with the correct formatting and indentation: Managing environments — conda 4.13.0.post44+7a304c8e9 documentation

Additionally, you should omit the prefix: D:\Downloads\anaconda3\envs\ArgumentEffectiveness. That path doesn’t exist in your app’s container.

2 Likes

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