PythonAnywhere Forums

Unable to Install Necessary Package in Bash Console

I am attempting to add a feature in my app that will allow users to download the pdf version of their homepage. However, to do that, I need to install a package for flask called wkhtmltopdf. In order to install it, I need to run apt-get install wkhtmltopdf in the console. However, when I run that command, I receive the error:

E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?

Is there any way to work around this problem? Thank you.

Hi there, these two help pages should help?

https://help.pythonanywhere.com/pages/PDF

https://help.pythonanywhere.com/pages/InstallingNewModules

rgds,

Thank you for your response. There is no possible way to use apt-get to install the package?

No. you would have to use the gcc toolchain to build it yourself or transfer over a prebuilt binary.