I need sudo permission to install a python package

I’m trying to use python on Glitch, but i need the sudo permissions to install the pyoppai module, my bot need this to work, there is any workaround for this ? thanks in advance!

also i’m getting this when i try to install:

$ python3 setup.py install
running install
running build
running build_ext
running install_lib
copying build/lib.linux-x86_64-3.5/pyoppai.cpython-35m-x86_64-linux-gnu.so -> /usr/local/lib/python3.5/dist-packages
error: could not create ‘/usr/local/lib/python3.5/dist-packages/pyoppai.cpython-35m-x86_64-linux-gnu.so’: Permission denied

1 Like

Hi @NikoBotDev. One thing you could try is installing in your user area rather than globally

python3 setup.py install --user --prefix=


This should install python packages into /app/.local which you do have permission to write to.


Thanks that worked!!!

1 Like

try using virtualenv for future installations to prevent overuse of the prefix

follow what @Galadirith said with virtualenv and go on from there