Skip to content

Require requirements.txt file #538

Open
@gshotwell

Description

@gshotwell

Currently the package generates a requirements.txt file automatically as part of the deployment process which causes a lot of problems for neophite users. A few observations from supporting lots of python users through this process:

  1. Virtual environments are essential to python deployments
    When people try to deploy to either Connect or Shinyapps without a virtual environment they have a horrible time, and get really bewildering failures after long deploy jobs. I have never seen a real user have a good time with our products without using a virtual environment.

  2. People who use virtual environments likely also use requirements.txt files
    As a result it's not a burden for these users to be required to either do their own pip freeze or maintain their own requirments file, and generating it automatically doesn't help them

  3. People who don't know about requirements.txt files are likely not using a virtual environment. These people seem to benefit from the automatic file generation, but it's actually just making their error worse and more obscure. In particular:

  • Their system python is likely a mess so pip freeze will generate an unsolvable environment and a deployment failure. The error they get back doesn't help them, and it only occurs after Connect or Shinyapps have spent a long time trying to install things
  • Locking things down to particular package versions is too restrictive and also creates errors
  • OS-specific packaages like pywin are not installable on Linux servers, but are generated by pip freeze

As a result I think we should cancel the autogeneration and require the requirements.txt file. This is what Streamlit and HuggingFace require.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions