Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: dlopen... symbol not found in flat namespace #541

Closed
Se7enYXS opened this issue Jun 12, 2023 · 9 comments
Closed

ImportError: dlopen... symbol not found in flat namespace #541

Se7enYXS opened this issue Jun 12, 2023 · 9 comments
Labels
Bug Something isn't working dependencies Pull requests that update a dependency file macOS python Pull requests that update Python code

Comments

@Se7enYXS
Copy link

Se7enYXS commented Jun 12, 2023

When running kcc-c2e.py v5.6.2 on my Mac, there's an error :

Traceback (most recent call last):
File "/Users/se7en/Downloads/kcc-master/kcc-c2e.py", line 33, in
startC2E()
File "/Users/se7en/Downloads/kcc-master/kindlecomicconverter/startup.py", line 47, in startC2E
from .comic2ebook import main
File "/Users/se7en/Downloads/kcc-master/kindlecomicconverter/comic2ebook.py", line 45, in
from . import image
File "/Users/se7en/Downloads/kcc-master/kindlecomicconverter/image.py", line 23, in
import mozjpeg_lossless_optimization
File "/opt/homebrew/lib/python3.11/site-packages/mozjpeg_lossless_optimization/init.py", line 1, in
from .mozjpeg_opti import optimize
File "/opt/homebrew/lib/python3.11/site-packages/mozjpeg_lossless_optimization/mozjpeg_opti.py", line 1, in
from ._mozjpeg_opti import lib, ffi
ImportError: dlopen(/opt/homebrew/lib/python3.11/site-packages/mozjpeg_lossless_optimization/_mozjpeg_opti.abi3.so, 0x0002): symbol not found in flat namespace '_jpeg_copy_critical_parameters'

I already installed all requirements.

There's no issue when running kcc-c2e.py v5.5.2.

Seems like an issue with mozjpeg-lossless-optimization package.

@Se7enYXS
Copy link
Author

Interestingly looks like you are using homebrew python too. I wonder if normal python works. Are you on m2 Mac mini too? Or any m2?

I'm using M1 Mac mini.

After trying this method , everything works fine now.

@axu2
Copy link
Collaborator

axu2 commented Jun 12, 2023

Thanks for confirming m1. I'm surprised you are the only other one to report this. Can you add m1 to the title? Apple silicon

@Se7enYXS Se7enYXS changed the title symbol not found in flat namespace '_jpeg_copy_critical_parameters' M1 Mac mini, symbol not found in flat namespace '_jpeg_copy_critical_parameters' Jun 12, 2023
@Se7enYXS
Copy link
Author

Thanks for confirming m1. I'm surprised you are the only other one to report this. Can you add m1 to the title?

Already change the title. Thanks for your help.

@darodi darodi added macOS dependencies Pull requests that update a dependency file labels Jun 12, 2023
@axu2
Copy link
Collaborator

axu2 commented Jul 31, 2023

Actually, I uninstalled everything in homebrew, I had some jpeg related stuff installed related to the Portal port.
I also uninstalled homebrew python, using python.org version instead.
Now it works. No clue why. Maybe just a slightly newer version of python fixed it.

Can @Se7enYXS help me figure out which part caused the error? Please try normal python.

Also @vinhtq115 did you run into this issue? Which python version did you use?

@vinhtq115
Copy link
Contributor

Actually, I uninstalled everything in homebrew, I had some jpeg related stuff installed related to the Portal port. I also uninstalled homebrew python, using python.org version instead. Now it works. No clue why. Maybe just a slightly newer version of python fixed it.

Can @Se7enYXS help me figure out which part caused the error? Please try normal python.

Also @vinhtq115 did you run into this issue? Which python version did you use?

I haven’t run into this issue yet. I am using Python 3.11.4 from Homebrew. Also, I always create a virtual environment from that Python for compiling kcc.

@Se7enYXS
Copy link
Author

Se7enYXS commented Jul 31, 2023

@axu2

Can confirm, python 3.11.4 from python.org works fine, does not need this method, just pip3 install mozjpeg-lossless-optimization, then every thing works.

@darodi
Copy link
Collaborator

darodi commented Aug 7, 2023

it seems resolved
closing this.

reopen if needed

@darodi darodi closed this as completed Aug 7, 2023
@Observer5
Copy link

my python version is 3.10.13
ImportError: dlopen(/opt/homebrew/lib/python3.10/site-packages/mozjpeg_lossless_optimization/_mozjpeg_opti.abi3.so, 0x0002): symbol not found in flat namespace '_jpeg_CreateCompress'

@axu2
Copy link
Collaborator

axu2 commented Feb 23, 2024

@Observer5 Please try latest python 3.11. I use 3.11.4

3.12 isn't supported yet.

@axu2 axu2 changed the title M1 Mac mini, symbol not found in flat namespace '_jpeg_copy_critical_parameters' ImportError: dlopen... symbol not found in flat namespace Feb 23, 2024
@axu2 axu2 added python Pull requests that update Python code Bug Something isn't working dependencies Pull requests that update a dependency file and removed Bug Something isn't working dependencies Pull requests that update a dependency file labels Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working dependencies Pull requests that update a dependency file macOS python Pull requests that update Python code
Projects
None yet
Development

No branches or pull requests

5 participants