ERPNext.com Frappe Cloud Support Partners Foundation Frappe School

Install third party python libraries (e.g. PDFMiner)

I would like to use third party python libraries in a server whitelist script.
The thing is: by running pip pip install pdfminer I am unable to use this library in a py file:

Failed to get method for command
xxx.xxx.doctype.yyy.pdf_data.pdfmetadata with No module named 'pdfminer'

Is it even possible to import third party libraries using installation manager that fixes all prerequisites?

You’ll have to activate the virtual environment first:

# change to bench directory
cd /home/frappe/frappe-bench
# activate virtual environment
source env/bin/activate
# install python package in virtual environment
pip install pdfminer
2 Likes

Thanks!
Haven’t had a chance to handle virtual environments “hands on” by myself by now.