#import python opencv
17 messages · Page 1 of 1 (latest)
Project ID: 13160e48-de83-4357-ae78-221b90810634
You might find these helpful:
13160e48-de83-4357-ae78-221b90810634
do you have a nixpacks.toml?
i'm trying rn to add [phases.setup]
aptPkgs = ["ffmpeg", "libsm6", "libxext6"]
before you do that, try adding opencv-python to your requirements.txt file
already done
didn't work
then try this nixpacks.toml file
[phases.setup]
aptPkgs = ["...", "libgl1"]
same error Traceback (most recent call last):
File "main.py", line 7, in <module>
import cv2
File "/opt/venv/lib/python3.8/site-packages/cv2/init.py", line 181, in <module>
bootstrap()
File "/opt/venv/lib/python3.8/site-packages/cv2/init.py", line 153, in bootstrap
native_module = importlib.import_module("cv2")
File "/nix/store/9493ngfjwisjm5f5s5ld5m34rdy431ic-python3-3.8.16/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: libGL.so.1: cannot open shared object file: No such file or directory
@ornate lynx
please dont ping me like that
oh sorry
replace opencv-python with opencv-python-headless
thx
works?