Including packages that require files in the PATH or apt-get

I have an app with the Python 3.10 (Beta) environment so that I can include some custom packages.

An example package where I am encountering an issue is pdf2image. For this package to work when included, it also requires poppler to be installed. This is not via pip and is usually downloaded or installed using apt-get, brew or conda. So I cannot just add it using the built in package manager.

Is there anything that I can do in this situation to still be able to use pdf2image in my build?

I have the same issue with pytesseract and not having tesseract in my PATH

Welcome to the forum!

Both pdf2image and pytesseract are in the standard packages (Anvil Docs | List of Packages) when you’re using the Full Python 3 server. If those were all you were trying to install, just switch back to the full Python 3 version and use them there.

The beta package installation only works well with packages that depend only on other pip packages. Anything that has external dependencies isn’t going to work correctly, as you’ve discovered.

Most people, when they run into packages that aren’t in the full Python 3 list that have external dependencies, fall back to an Uplink solution since you have control over the uplink server and can install any needed external dependencies there.

I’m sure the Anvil folks are working out how to support these sorts of packages, but the package manager is still a beta feature.

1 Like