Open Qiii77 opened 6 months ago
I also had this issue. Solved it by insert the following lines in annotation_gui_gcp/main.py before the line from annotation_gui_gcp.lib import GUI
:
# Add opensfm directory to path
import os
opensfm_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
import sys
sys.path.append(opensfm_dir)
I also had this issue. Solved it by insert the following lines in annotation_gui_gcp/main.py before the line
from annotation_gui_gcp.lib import GUI
:# Add opensfm directory to path import os opensfm_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) import sys sys.path.append(opensfm_dir)
I tried according to your method, but the result is still the same as before and cannot run. May require some other suggestions,thank you very much.
back (most recent call last): File "D:\opensourceProject\OpenSfM\annotation_gui_gcp\main.py", line 11, in
from annotation_gui_gcp.lib import GUI
File "D:\opensourceProject\OpenSfM\annotation_gui_gcp\lib\GUI.py", line 14, in
from opensfm import dataset
File "D:\opensourceProject\OpenSfM\opensfm__init__.py", line 2, in
from opensfm import pybundle
ImportError: cannot import name 'pybundle' from partially initialized module 'opensfm' (most likely due to a circular import)