error OSError: [Errno 30] Read-only file system: '/ '

Question:

I was trying to install new packages in an application with pip, but I got this error

from pip._internal import main as pipmain



pipmain(['install','mechanize','-t .'])
Asked By: وائل خالد

||

Answers:

If you want to add packages to your app, don’t run pip at runtime, use Chaquopy’s built-in pip support as documented here.

Answered By: mhsmith

Yes need change directory to home:

import os
os.chdir("/data/data/com.lamineml.compiler_python3/files/")
Answered By: وائل خالد
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.