"[Errno 30] Read-only file system " Error When Deploying to DO Functions via Python


I am trying to deploy my python scripts which involve externally installed python packages to Digital Ocean Functions, however, I get the following error every time during the deployment process

Installing collected packages: psycopg2, numpy, pandas ERROR: Could not install packages due to an OSError: [Errno 30] Read-only file system: ‘/usr/local/lib/python3.9/site-packages/psycopg2’

Here are how my scripts and folders are structured:


  • packages
    • sentiment
      • summary
        • __ main
        • requirements.txt
  • project.yml

My project.yml script is as follow:

  - name: sentiment
      - name: summary
        runtime: 'python:default'

The requirements.txt file contains all Python packages that need to be installed:


The file contains instructions to install packages during the remote build process during deployment

set -e
virtualenv virtualenv
source virtualenv/bin/activate
pip install -r requirements.txt

This error would pop up after running the following command for a while:

doctl serverless deploy cryptometrics --remote-build

Does anyone here face this problem before?

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Bobby Iliev
Site Moderator
Site Moderator badge
October 14, 2022

Hi there,

I’ve just tried this with the following sample function:

The sample function has the same instruction as the one that you’ve described, however it seems to be working as expected.

What I could suggest is, if you have the cryptometrics already deployed, try to deleted it and redeploy it again with the command that you’ve provided.

Let me know how it goes!



Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up