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:
My project.yml script is as follow:
packages: - name: sentiment actions: - name: summary runtime: 'python:default'
The requirements.txt file contains all Python packages that need to be installed:
The build.sh file contains instructions to install packages during the remote build process during deployment
#!/bin/bash set -e virtualenv virtualenv source virtualenv/bin/activate pip install -r requirements.txt deactivate
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?
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!
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.
Click below to sign up and get $200 of credit to try our products over 60 days!
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
cryptometricsalready deployed, try to deleted it and redeploy it again with the command that you’ve provided.
Let me know how it goes!