No module named fitz
I'm deploying a Python Flask app that uses the python library PyMuPDF to handle PDFs. One of the modules that PyMuPDF needs is fitz. Requires a simple pip install for both of these. I believe it isn't on the default python available in Railway. How can this be added?
8 Replies
Project ID:
N/A
just make a requirements.txt file and add it there
N/A
I have the PyMuPDF in my requirements.txt already. You mean I should add fitz too?
yes
if its on pip then you just add it there and it installs it
ok will do and will share result here. Thanks!
here's my requirements file:
Flask==2.3.2
langchain==0.0.170
openai==0.27.6
pandas==1.5.3
pinecone_client==2.2.1
PyMuPDF==1.22.3
Werkzeug==2.3.4
fitz==0.0.1
I still get the same error...
did you remove the old deployment and did railway up right?
if so then its pretty weird
yes, I did. it is weird
I'm looking if there isn't a way for me to change my code. Because accessing the fitz library in my project directly triggers a bunch of different dependencies. I think it's anyway adding inefficiencies in my code no wthat I see this
Is fitz successfully installing? Can you run a command before your start command to check the version?
Maybe just pip freeze?