Hi @CE ,
Yes, you can install packages from a requirements.txt file in Databricks, similar to using pip install -r requirements.txt in a local environment. However, the path you provided (/Workspace/Users/xxx@domain.com/databrick_requirement.txt) isn't directly accessible by the %pip command.
1. If you have a unity catalog available, create a Volume, upload your file to the volume and then run your pip install command like:
%pip install -r "/Volumes/<path to the file>/requirements.txt"
2. If you using the old workspace without unity catalog, do similarly, but upload the file to DBFS
3. Also, instead of running %pip install within individual notebooks, a more efficient approach—especially for managing dependencies across multiple notebooks and users—is to use init scripts. This ensures that all necessary libraries are installed automatically when the cluster starts.