Currently I am trying to build a custom n8n image in docker that has python packages built in, but I’m having trouble setting up a virtual environment for the packages.
Here’s my docker file:
FROM n8nio/n8n
USER root
RUN apk add --no-cache / python3 / py3-pip / python3-dev
RUN python3 venv /opt/venv
ENV PATH=”/opt/venv/bin:$PATH”
RUN pip install --no-cache-dir youtube-transcript-api
USER node
Im running on Ubuntu 24.04.3 LTS
I get the error that /opt/venv/bin directory doesn’t exist but I’m not sure where the virtual environments are kept on ubuntu.