Open jharsono opened 5 months ago
I was able to get closer with Anaconda, setting my environment to x64 as suggested here, https://stackoverflow.com/questions/70205633/cannot-install-python-3-7-on-osx-arm64, and using Python 3.7.9
Here's the current error after running pip install -r requirements.txt
successfully and python main_ocean.py
:
Traceback (most recent call last):
File "/Users/jharsono/anaconda3/envs/fishscanner2/lib/python3.7/site-packages/OpenGL/platform/darwin.py", line 38, in GL
mode=ctypes.RTLD_GLOBAL
File "/Users/jharsono/anaconda3/envs/fishscanner2/lib/python3.7/site-packages/OpenGL/platform/ctypesloader.py", line 45, in loadLibrary
return dllType( name, mode )
File "/Users/jharsono/anaconda3/envs/fishscanner2/lib/python3.7/ctypes/__init__.py", line 364, in __init__
self._handle = _dlopen(self._name, mode)
OSError: ("dlopen(OpenGL, 0x000A): tried: 'OpenGL' (no such file), '/System/Volumes/Preboot/Cryptexes/OSOpenGL' (no such file), '/Users/jharsono/anaconda3/envs/fishscanner2/lib/OpenGL' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/jharsono/anaconda3/envs/fishscanner2/lib/OpenGL' (no such file), '/Users/jharsono/anaconda3/envs/fishscanner2/lib/OpenGL' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/jharsono/anaconda3/envs/fishscanner2/lib/OpenGL' (no such file), '/Users/jharsono/anaconda3/envs/fishscanner2/lib/OpenGL' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/jharsono/anaconda3/envs/fishscanner2/lib/OpenGL' (no such file), '/Users/jharsono/anaconda3/envs/fishscanner2/lib/python3.7/lib-dynload/../../OpenGL' (no such file), '/Users/jharsono/anaconda3/envs/fishscanner2/lib/OpenGL' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/jharsono/anaconda3/envs/fishscanner2/lib/OpenGL' (no such file), '/Users/jharsono/anaconda3/envs/fishscanner2/lib/OpenGL' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/jharsono/anaconda3/envs/fishscanner2/lib/OpenGL' (no such file), '/Users/jharsono/anaconda3/envs/fishscanner2/bin/../lib/OpenGL' (no such file), '/usr/lib/OpenGL' (no such file, not in dyld cache), 'OpenGL' (no such file), '/usr/local/lib/OpenGL' (no such file), '/usr/lib/OpenGL' (no such file, not in dyld cache)", 'OpenGL', None)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "main_ocean.py", line 7, in <module>
import OpenGL.GL as gl
File "/Users/jharsono/anaconda3/envs/fishscanner2/lib/python3.7/site-packages/OpenGL/GL/__init__.py", line 3, in <module>
from OpenGL import error as _error
File "/Users/jharsono/anaconda3/envs/fishscanner2/lib/python3.7/site-packages/OpenGL/error.py", line 12, in <module>
from OpenGL import platform, _configflags
File "/Users/jharsono/anaconda3/envs/fishscanner2/lib/python3.7/site-packages/OpenGL/platform/__init__.py", line 35, in <module>
_load()
File "/Users/jharsono/anaconda3/envs/fishscanner2/lib/python3.7/site-packages/OpenGL/platform/__init__.py", line 32, in _load
plugin.install(globals())
File "/Users/jharsono/anaconda3/envs/fishscanner2/lib/python3.7/site-packages/OpenGL/platform/baseplatform.py", line 92, in install
namespace[ name ] = getattr(self,name,None)
File "/Users/jharsono/anaconda3/envs/fishscanner2/lib/python3.7/site-packages/OpenGL/platform/baseplatform.py", line 14, in __get__
value = self.fget( obj )
File "/Users/jharsono/anaconda3/envs/fishscanner2/lib/python3.7/site-packages/OpenGL/platform/darwin.py", line 62, in GetCurrentContext
return self.CGL.CGLGetCurrentContext
File "/Users/jharsono/anaconda3/envs/fishscanner2/lib/python3.7/site-packages/OpenGL/platform/baseplatform.py", line 14, in __get__
value = self.fget( obj )
File "/Users/jharsono/anaconda3/envs/fishscanner2/lib/python3.7/site-packages/OpenGL/platform/darwin.py", line 45, in CGL
def CGL(self): return self.GL
File "/Users/jharsono/anaconda3/envs/fishscanner2/lib/python3.7/site-packages/OpenGL/platform/baseplatform.py", line 14, in __get__
value = self.fget( obj )
File "/Users/jharsono/anaconda3/envs/fishscanner2/lib/python3.7/site-packages/OpenGL/platform/darwin.py", line 41, in GL
raise ImportError("Unable to load OpenGL library", *err.args)
ImportError: ('Unable to load OpenGL library', "dlopen(OpenGL, 0x000A): tried: 'OpenGL' (no such file), '/System/Volumes/Preboot/Cryptexes/OSOpenGL' (no such file), '/Users/jharsono/anaconda3/envs/fishscanner2/lib/OpenGL' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/jharsono/anaconda3/envs/fishscanner2/lib/OpenGL' (no such file), '/Users/jharsono/anaconda3/envs/fishscanner2/lib/OpenGL' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/jharsono/anaconda3/envs/fishscanner2/lib/OpenGL' (no such file), '/Users/jharsono/anaconda3/envs/fishscanner2/lib/OpenGL' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/jharsono/anaconda3/envs/fishscanner2/lib/OpenGL' (no such file), '/Users/jharsono/anaconda3/envs/fishscanner2/lib/python3.7/lib-dynload/../../OpenGL' (no such file), '/Users/jharsono/anaconda3/envs/fishscanner2/lib/OpenGL' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/jharsono/anaconda3/envs/fishscanner2/lib/OpenGL' (no such file), '/Users/jharsono/anaconda3/envs/fishscanner2/lib/OpenGL' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/jharsono/anaconda3/envs/fishscanner2/lib/OpenGL' (no such file), '/Users/jharsono/anaconda3/envs/fishscanner2/bin/../lib/OpenGL' (no such file), '/usr/lib/OpenGL' (no such file, not in dyld cache), 'OpenGL' (no such file), '/usr/local/lib/OpenGL' (no such file), '/usr/lib/OpenGL' (no such file, not in dyld cache)", 'OpenGL', None)```
Update again with a new error, so that's progress! I followed the steps here: https://stackoverflow.com/questions/63475461/unable-to-import-opengl-gl-in-python-on-macos
Now this is the message:
Unable to load font: GLUT_STROKE_ROMAN
Unable to load font: GLUT_STROKE_MONO_ROMAN
Unable to load font: GLUT_BITMAP_9_BY_15
Unable to load font: GLUT_BITMAP_8_BY_13
Unable to load font: GLUT_BITMAP_TIMES_ROMAN_10
Unable to load font: GLUT_BITMAP_TIMES_ROMAN_24
Unable to load font: GLUT_BITMAP_HELVETICA_10
Unable to load font: GLUT_BITMAP_HELVETICA_12
Unable to load font: GLUT_BITMAP_HELVETICA_18
Traceback (most recent call last):
File "main_ocean.py", line 295, in <module>
main()
File "main_ocean.py", line 269, in main
scanner = SimpleScanner()
File "/Users/jharsono/projects/fishscanner/engine/simplescanner.py", line 14, in __init__
self._aruco_dict = cv2.aruco.Dictionary_get(cv2.aruco.DICT_4X4_50)
AttributeError: module 'cv2.aruco' has no attribute 'Dictionary_get'
Now I'm trying to work through this when I googled the issue: https://stackoverflow.com/questions/74964527/attributeerror-module-cv2-aruco-has-no-attribute-dictionary-get
To the top of main_ocean.py
I added
import faulthandler
faulthandler.enable()
to debug.
A segmentation fault occurs after instantiating SimpleScanner()
. Since the fault handler didn't have any insight into that code, I pasted the simplescanner.py
code at the top instead of importing.
Here's latest:
Current thread 0x0000000205191240 (most recent call first):
File "/Users/jharsono/anaconda3/envs/fishscanner2/lib/python3.7/site-packages/OpenGL/platform/baseplatform.py", line 402 in __call__
File "main_ocean.py", line 529 in main
File "main_ocean.py", line 555 in <module>
zsh: segmentation fault python main_ocean.py```
@david-svitov any ideas?
Since python 3.7 is no longer supported, can you make the app compatible with newer versions of python and other dependencies? I haven't been able to run this on an Apple Silicon Mac.