Search code examples
pythonpipcairogoogle-cloud-mlpycairo

ML Engine: Package libffi was not found


I'm trying to train a model in ML Engine that uses the cairocffi python module, which has a dependency on something called libffi. In the logs I get the message No package 'libffi' found. Others who've had this problem solve it by executing apt-get install libffi-dev on their machine before running pip install cairocffi. Is there a way to install such a dependency for a ML Engine job?


Solution

  • For dependencies that can't be installed by pip, you can package them in a container and run it on Cloud ML Engine. How to run custom containers is documented here.