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

macOS mojave 10.14.5 import error #10

Open
mohaoran93 opened this issue May 27, 2020 · 3 comments
Open

macOS mojave 10.14.5 import error #10

mohaoran93 opened this issue May 27, 2020 · 3 comments

Comments

@mohaoran93
Copy link

When I import the package, I encountered one error like this from .componentinfo import ComponentInfo ModuleNotFoundError: No module named 'jpegio.componentinfo'
All log from installation to import are following,

(py3image) Mo-Haorans-MBP:jpegio mo$ python setup.py install
[LIBJPEG] libjpeg-turbo is used for the functionality of libjpeg.
DIR_LIBJPEG_HEADER: /Users/mo/Documents/projects_none_git/alaska2/jpeg_explanations/jpegio/jpegio/libjpeg-turbo/mac_x64/include
DIR_LIBJPEG_SOURCE: jpegio/libjpeg-turbo/mac_x64/src
Compiling jpegio/componentinfo.pyx because it changed.
Compiling jpegio/decompressedjpeg.pyx because it changed.
[1/2] Cythonizing jpegio/componentinfo.pyx
[2/2] Cythonizing jpegio/decompressedjpeg.pyx
running install
running bdist_egg
running egg_info
creating jpegio.egg-info
writing jpegio.egg-info/PKG-INFO
writing dependency_links to jpegio.egg-info/dependency_links.txt
writing top-level names to jpegio.egg-info/top_level.txt
writing manifest file 'jpegio.egg-info/SOURCES.txt'
reading manifest file 'jpegio.egg-info/SOURCES.txt'
writing manifest file 'jpegio.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.9-x86_64/egg
running install_lib
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-3.6
creating build/lib.macosx-10.9-x86_64-3.6/jpegio
copying jpegio/flags.py -> build/lib.macosx-10.9-x86_64-3.6/jpegio
copying jpegio/io.py -> build/lib.macosx-10.9-x86_64-3.6/jpegio
copying jpegio/__init__.py -> build/lib.macosx-10.9-x86_64-3.6/jpegio
copying jpegio/clibjpeg.pxd -> build/lib.macosx-10.9-x86_64-3.6/jpegio
copying jpegio/componentinfo.pxd -> build/lib.macosx-10.9-x86_64-3.6/jpegio
copying jpegio/decompressedjpeg.pxd -> build/lib.macosx-10.9-x86_64-3.6/jpegio
copying jpegio/jstruct.pxd -> build/lib.macosx-10.9-x86_64-3.6/jpegio
copying jpegio/componentinfo.pyx -> build/lib.macosx-10.9-x86_64-3.6/jpegio
copying jpegio/decompressedjpeg.pyx -> build/lib.macosx-10.9-x86_64-3.6/jpegio
copying jpegio/mat2D.h -> build/lib.macosx-10.9-x86_64-3.6/jpegio
copying jpegio/jstruct.h -> build/lib.macosx-10.9-x86_64-3.6/jpegio
running build_ext
building 'jpegio.componentinfo' extension
creating build/temp.macosx-10.9-x86_64-3.6
creating build/temp.macosx-10.9-x86_64-3.6/jpegio
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/mo/anaconda3/envs/py3image/include -arch x86_64 -I/Users/mo/anaconda3/envs/py3image/include -arch x86_64 -I. -I/Users/mo/anaconda3/envs/py3image/lib/python3.6/site-packages/numpy/core/include -I/Users/mo/Documents/projects_none_git/alaska2/jpeg_explanations/jpegio -I/Users/mo/Documents/projects_none_git/alaska2/jpeg_explanations/jpegio/jpegio/libjpeg-turbo/mac_x64/include -I/Users/mo/Documents/projects_none_git/alaska2/jpeg_explanations/jpegio/jpegio -I/Users/mo/anaconda3/envs/py3image/include/python3.6m -c jpegio/componentinfo.cpp -o build/temp.macosx-10.9-x86_64-3.6/jpegio/componentinfo.o -w -fPIC -march=native -std=c++11 -mmacosx-version-min=10.9 -m64
g++ -bundle -undefined dynamic_lookup -L/Users/mo/anaconda3/envs/py3image/lib -arch x86_64 -L/Users/mo/anaconda3/envs/py3image/lib -arch x86_64 -arch x86_64 build/temp.macosx-10.9-x86_64-3.6/jpegio/componentinfo.o -o build/lib.macosx-10.9-x86_64-3.6/jpegio/componentinfo.cpython-36m-darwin.so -stdlib=libc++ -mmacosx-version-min=10.9
building 'jpegio.decompressedjpeg' extension
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/mo/anaconda3/envs/py3image/include -arch x86_64 -I/Users/mo/anaconda3/envs/py3image/include -arch x86_64 -I./jpegio -I. -I/Users/mo/anaconda3/envs/py3image/lib/python3.6/site-packages/numpy/core/include -I/Users/mo/Documents/projects_none_git/alaska2/jpeg_explanations/jpegio -I/Users/mo/Documents/projects_none_git/alaska2/jpeg_explanations/jpegio/jpegio/libjpeg-turbo/mac_x64/include -I/Users/mo/Documents/projects_none_git/alaska2/jpeg_explanations/jpegio/jpegio -I/Users/mo/anaconda3/envs/py3image/include/python3.6m -c jpegio/decompressedjpeg.cpp -o build/temp.macosx-10.9-x86_64-3.6/jpegio/decompressedjpeg.o -w -fPIC -march=native -std=c++11 -mmacosx-version-min=10.9 -m64
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/mo/anaconda3/envs/py3image/include -arch x86_64 -I/Users/mo/anaconda3/envs/py3image/include -arch x86_64 -I./jpegio -I. -I/Users/mo/anaconda3/envs/py3image/lib/python3.6/site-packages/numpy/core/include -I/Users/mo/Documents/projects_none_git/alaska2/jpeg_explanations/jpegio -I/Users/mo/Documents/projects_none_git/alaska2/jpeg_explanations/jpegio/jpegio/libjpeg-turbo/mac_x64/include -I/Users/mo/Documents/projects_none_git/alaska2/jpeg_explanations/jpegio/jpegio -I/Users/mo/anaconda3/envs/py3image/include/python3.6m -c jpegio/jstruct.cpp -o build/temp.macosx-10.9-x86_64-3.6/jpegio/jstruct.o -w -fPIC -march=native -std=c++11 -mmacosx-version-min=10.9 -m64
g++ -bundle -undefined dynamic_lookup -L/Users/mo/anaconda3/envs/py3image/lib -arch x86_64 -L/Users/mo/anaconda3/envs/py3image/lib -arch x86_64 -arch x86_64 build/temp.macosx-10.9-x86_64-3.6/jpegio/decompressedjpeg.o build/temp.macosx-10.9-x86_64-3.6/jpegio/jstruct.o -L/Users/mo/Documents/projects_none_git/alaska2/jpeg_explanations/jpegio/jpegio/libjpeg-turbo/mac_x64/lib -ljpeg -o build/lib.macosx-10.9-x86_64-3.6/jpegio/decompressedjpeg.cpython-36m-darwin.so -stdlib=libc++ -mmacosx-version-min=10.9
creating build/bdist.macosx-10.9-x86_64
creating build/bdist.macosx-10.9-x86_64/egg
creating build/bdist.macosx-10.9-x86_64/egg/jpegio
copying build/lib.macosx-10.9-x86_64-3.6/jpegio/componentinfo.pyx -> build/bdist.macosx-10.9-x86_64/egg/jpegio
copying build/lib.macosx-10.9-x86_64-3.6/jpegio/decompressedjpeg.pyx -> build/bdist.macosx-10.9-x86_64/egg/jpegio
copying build/lib.macosx-10.9-x86_64-3.6/jpegio/componentinfo.cpython-36m-darwin.so -> build/bdist.macosx-10.9-x86_64/egg/jpegio
copying build/lib.macosx-10.9-x86_64-3.6/jpegio/flags.py -> build/bdist.macosx-10.9-x86_64/egg/jpegio
copying build/lib.macosx-10.9-x86_64-3.6/jpegio/io.py -> build/bdist.macosx-10.9-x86_64/egg/jpegio
copying build/lib.macosx-10.9-x86_64-3.6/jpegio/__init__.py -> build/bdist.macosx-10.9-x86_64/egg/jpegio
copying build/lib.macosx-10.9-x86_64-3.6/jpegio/clibjpeg.pxd -> build/bdist.macosx-10.9-x86_64/egg/jpegio
copying build/lib.macosx-10.9-x86_64-3.6/jpegio/decompressedjpeg.cpython-36m-darwin.so -> build/bdist.macosx-10.9-x86_64/egg/jpegio
copying build/lib.macosx-10.9-x86_64-3.6/jpegio/componentinfo.pxd -> build/bdist.macosx-10.9-x86_64/egg/jpegio
copying build/lib.macosx-10.9-x86_64-3.6/jpegio/decompressedjpeg.pxd -> build/bdist.macosx-10.9-x86_64/egg/jpegio
copying build/lib.macosx-10.9-x86_64-3.6/jpegio/mat2D.h -> build/bdist.macosx-10.9-x86_64/egg/jpegio
copying build/lib.macosx-10.9-x86_64-3.6/jpegio/jstruct.pxd -> build/bdist.macosx-10.9-x86_64/egg/jpegio
copying build/lib.macosx-10.9-x86_64-3.6/jpegio/jstruct.h -> build/bdist.macosx-10.9-x86_64/egg/jpegio
byte-compiling build/bdist.macosx-10.9-x86_64/egg/jpegio/flags.py to flags.cpython-36.pyc
byte-compiling build/bdist.macosx-10.9-x86_64/egg/jpegio/io.py to io.cpython-36.pyc
byte-compiling build/bdist.macosx-10.9-x86_64/egg/jpegio/__init__.py to __init__.cpython-36.pyc
creating stub loader for jpegio/componentinfo.cpython-36m-darwin.so
creating stub loader for jpegio/decompressedjpeg.cpython-36m-darwin.so
byte-compiling build/bdist.macosx-10.9-x86_64/egg/jpegio/componentinfo.py to componentinfo.cpython-36.pyc
byte-compiling build/bdist.macosx-10.9-x86_64/egg/jpegio/decompressedjpeg.py to decompressedjpeg.cpython-36.pyc
creating build/bdist.macosx-10.9-x86_64/egg/EGG-INFO
copying jpegio.egg-info/PKG-INFO -> build/bdist.macosx-10.9-x86_64/egg/EGG-INFO
copying jpegio.egg-info/SOURCES.txt -> build/bdist.macosx-10.9-x86_64/egg/EGG-INFO
copying jpegio.egg-info/dependency_links.txt -> build/bdist.macosx-10.9-x86_64/egg/EGG-INFO
copying jpegio.egg-info/not-zip-safe -> build/bdist.macosx-10.9-x86_64/egg/EGG-INFO
copying jpegio.egg-info/top_level.txt -> build/bdist.macosx-10.9-x86_64/egg/EGG-INFO
writing build/bdist.macosx-10.9-x86_64/egg/EGG-INFO/native_libs.txt
creating 'dist/jpegio-0.2.1-py3.6-macosx-10.9-x86_64.egg' and adding 'build/bdist.macosx-10.9-x86_64/egg' to it
removing 'build/bdist.macosx-10.9-x86_64/egg' (and everything under it)
Processing jpegio-0.2.1-py3.6-macosx-10.9-x86_64.egg
removing '/Users/mo/anaconda3/envs/py3image/lib/python3.6/site-packages/jpegio-0.2.1-py3.6-macosx-10.9-x86_64.egg' (and everything under it)
creating /Users/mo/anaconda3/envs/py3image/lib/python3.6/site-packages/jpegio-0.2.1-py3.6-macosx-10.9-x86_64.egg
Extracting jpegio-0.2.1-py3.6-macosx-10.9-x86_64.egg to /Users/mo/anaconda3/envs/py3image/lib/python3.6/site-packages
jpegio 0.2.1 is already the active version in easy-install.pth

Installed /Users/mo/anaconda3/envs/py3image/lib/python3.6/site-packages/jpegio-0.2.1-py3.6-macosx-10.9-x86_64.egg
Processing dependencies for jpegio==0.2.1
Finished processing dependencies for jpegio==0.2.1
(py3image) Mo-Haorans-MBP:jpegio mo$ python
Python 3.6.10 |Anaconda, Inc.| (default, May  7 2020, 23:06:31) 
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import jpegio as jio
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/mo/Documents/projects_none_git/alaska2/jpeg_explanations/jpegio/jpegio/__init__.py", line 6, in <module>
    from .componentinfo import ComponentInfo
ModuleNotFoundError: No module named 'jpegio.componentinfo'
@dwgoon
Copy link
Owner

dwgoon commented May 27, 2020

You should import the package outside the jpegio directory (e.g., jpegio mo). Have you tried?

@mohaoran93
Copy link
Author

When I work outside the jpegio dir, I got different error

>>> import jpegio as jio
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/mo/anaconda3/envs/py3image/lib/python3.6/site-packages/jpegio-0.2.1-py3.6-macosx-10.9-x86_64.egg/jpegio/__init__.py", line 7, in <module>
    from .decompressedjpeg import DecompressedJpeg
ImportError: dlopen(/Users/mo/anaconda3/envs/py3image/lib/python3.6/site-packages/jpegio-0.2.1-py3.6-macosx-10.9-x86_64.egg/jpegio/decompressedjpeg.cpython-36m-darwin.so, 2): Library not loaded: @rpath/libjpeg.62.dylib
  Referenced from: /Users/mo/anaconda3/envs/py3image/lib/python3.6/site-packages/jpegio-0.2.1-py3.6-macosx-10.9-x86_64.egg/jpegio/decompressedjpeg.cpython-36m-darwin.so
  Reason: image not found

@detrin
Copy link
Collaborator

detrin commented Aug 14, 2023

Most likely this will be solved in #27 could you check it now please? @mohaoran93

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants