I cannot use opencv2 and received ImportError: libgl.so.1 cannot open shared object file no such fil
Can anyone help me with that ??
31 Replies
Project ID:
5a3e0b60-6df7-46d9-95dd-0dd4e2b53849
5a3e0b60-6df7-46d9-95dd-0dd4e2b53849
project id
send your requirements.txt file please
yes
now
aiohttp==3.8.5
aiosignal==1.3.1
async-timeout==4.0.2
attrs==23.1.0
blinker==1.6.2
camelot-py==0.11.0
certifi==2023.7.22
cffi==1.15.1
chardet==5.1.0
charset-normalizer==3.2.0
click==8.1.6
colorama==0.4.6
cryptography==41.0.2
distro==1.8.0
et-xmlfile==1.1.0
flask==2.3.3
Flask-Cors==4.0.0
frozenlist==1.4.0
ghostscript==0.7
greenlet==2.0.2
idna==3.4
importlib-metadata==6.8.0
itsdangerous==2.1.2
Jinja2==3.1.2
lxml==4.9.3
MarkupSafe==2.1.3
multidict==6.0.4
numpy==1.25.2
openai==0.27.8
opencv-python==4.8.0.74
openpyxl==3.1.2
pandas==2.0.3
pdfminer.six==20221105
pdftopng==0.2.3
Pillow==10.0.0
psycopg2==2.9.7
pycparser==2.21
pypdf==3.14.0
pypdf2==3.0.1
python-dateutil==2.8.2
python-docx==0.8.11
pytz==2023.3
requests==2.31.0
six==1.16.0
SQLAlchemy==2.0.20
tabula-py==2.7.0
tabulate==0.9.0
tqdm==4.65.0
typing-extensions==4.7.1
tzdata==2023.3
Unidecode==1.3.6
urllib3==2.0.4
werkzeug==2.3.7
yarl==1.9.2
zipp==3.16.2
are you using all of those packages?
most of is dependencys
of others
side note, please enclose all code / code-like text blocks in triple back ticks
sorry, i don't understand, u need the code ?
nevermind
replace your requirements.txt with this
ah okay
i will test
oh men
u save my work
literally
thank u so much
no problem!
[2023-08-25 15:20:17 +0000] [10] [INFO] Worker exiting (pid: 10)
[2023-08-25 15:20:18 +0000] [1] [INFO] Shutting down: Master
[2023-08-25 15:20:18 +0000] [1] [INFO] Reason: App failed to load.
[2023-08-25 15:20:21 +0000] [1] [INFO] Starting gunicorn 20.0.4
[2023-08-25 15:20:21 +0000] [1] [INFO] Listening at: http://0.0.0.0:6210 (1)
[2023-08-25 15:20:21 +0000] [1] [INFO] Using worker: sync
[2023-08-25 15:20:21 +0000] [10] [INFO] Booting worker with pid: 10
Failed to find attribute 'app' in 'main'.
only code error now, but i solve
thank u sooooooooo much ❤️
do you have a main.py?
yees
flask?
i think is this the error
yeah move all that stuff outside of the main() function
okaay
and make sure you have this thing
https://github.com/railwayapp-templates/flask/blob/main/main.py#L12-L13
that if statement is very important
i will modify
for equal than your
yeah make it look like the template
yeeeeeeeeeeees 😄
this go up
Ops, already did, thank u so much meen <3, i will apresentate this project today haha
I will just mark as solved, this question was far too specific to your app to mark a solution
A okaaay
Thanks for all support.
oh wait I can just do this
Solution
use the
headless
version of the opencv packagethere we go, happy I could help