Python environment
Configure your Python environment for access to the packages you need.
The Python environment runs Python 3.9 and comes with a number of common data science packages pre-installed such as numpy, pandas, and scipy. A full list of installed packages is linked below.

Installing a PyPi package

You might need to use a Python package that is not installed in the environment that runs your Code and Decision blocks. For instance you might need requests. You can specify packages according to standard pip specifications in your workspace settings under the "Python environment" tab.
If you are not using the draft environment feature, you'll instead specify Python packages in the requirements.txt file in your application.
You can also modify your Python environment through the settings modal, which will update your requirements.
Adding packages in the requirements.txt file
Any packages installed will be accessible to every application in your workspace, so all applications will need to share the same version of installed packages.

Installing a custom Python wheel

And at times you might want to reuse some code that you've already written and would rather not have to copy/paste into Baseten. You can instead package it up as a Python wheel and use the full URL to link to it in your requirements.txt file:
Copy link
Installing a PyPi package
Installing a custom Python wheel