visual-chatgpt icon indicating copy to clipboard operation
visual-chatgpt copied to clipboard

Undefined Symbol When Running .py file

Open harriswr opened this issue 2 years ago • 2 comments

Hello,

I received the following error. I followed the "pip install -r requirement.txt" and "bash download.sh" set up from the main page.

/home/harriswr/codes/visual_gpt/visual-chatgpt-main/visual_chatgpt.py:22 in │ │ │ │ 19 import numpy as np │ │ 20 from omegaconf import OmegaConf │ │ 21 from transformers import pipeline, BlipProcessor, BlipForConditionalGeneration, BlipForQ │ │ ❱ 22 import cv2 │ │ 23 import einops │ │ 24 from pytorch_lightning import seed_everything │ │ 25 import random │ │ │ │ /home/harriswr/codes/anaconda3/envs/visgpt/lib/python3.8/site-packages/cv2/init.py:5 in │ │ │ │ │ │ 2 import os │ │ 3 import sys │ │ 4 │ │ ❱ 5 from .cv2 import * │ │ 6 from .data import * │ │ 7 │ │ 8 # wildcard import above does not import "private" variables like version │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ ImportError: /lib/x86_64-linux-gnu/libgobject-2.0.so.0: undefined symbol: ffi_type_uint32, version LIBFFI_BASE_7.0

Any idea how to fix this?

harriswr avatar Mar 10 '23 04:03 harriswr

This seemed to have solved it:

pip install opencv-python==4.5.1.48

I am running Ubuntu 20.04.5 LTS

wearenocomputer avatar Mar 10 '23 08:03 wearenocomputer

That worked! Thank you!

harriswr avatar Mar 10 '23 13:03 harriswr