Unable to Add External Python Libraries in Self-Hosted Retool Workflows Despite "Add Python Library" Option

Hi,
I’m running a self-hosted Retool instance on an EC2 instance with Docker Compose, and I’m trying to add external Python libraries (e.g., mem0) in the Workflows section. In the Libraries tab, I see the option to "Add Python library" alongside "Add JavaScript library," and I have JavaScript libraries listed (e.g., lodash, numbro). However, when I click "Add Python library," there’s no interface to add external packages or edit a requirements.txt file—only pre-installed Python packages (if any) are shown, but no option to include new ones like mem0.

image

The Retool docs mention that the code-executor needs to run in privileged mode for NsJail to handle Python execution, and I’ve set privileged: true in my docker-compose.yml. Here’s my code-executor config:

code-executor:
build:
context: ./
dockerfile: CodeExecutor.Dockerfile
command: bash -c "./start.sh"
env_file: ./docker.env
environment:
- DEPLOYMENT_TEMPLATE_TYPE=docker-compose
- NODE_OPTIONS=--max_old_space_size=1024
networks:
- code-executor-network
privileged: true
restart: on-failure

  • My CodeExecutor.Dockerfile is based on the default Retool setup (not modified).
  • The CODE_EXECUTOR_INGRESS_DOMAIN is set to http://code-executor:3004 in other services.
  • Workflows are enabled, and I can use Python Code blocks.
  • Retool version: 3.33.31

Why isn’t the option to add external Python libraries (e.g., via requirements.txt) appearing, even with the "Add Python library" button? Is this a configuration issue, a version limitation, or something else? Has anyone else seen this behavior with a similar EC2/Docker Compose setup? Any guidance would be appreciated!

Thanks.

Hi, you should update your self hosted Retool to the latest version. Then you should be able to see an option to modify the requirements.txt file.

Hi @Gourob,

I agree :slight_smile: is upgrading your Retool instance an option for you? If so, I recommend upgrading to 3.114 or 3.148 to get access.

Otherwise, I can manually enable the feature for you. I would just need you to DM me the email of the person who created your Retool org or your license key