Closed mohaoran93 closed 4 years ago
Could you paste all log lines here?
It may also be helpful to give an information on your Python environment.
Could you paste all log lines here?
It may also be helpful to give an information on your Python environment.
Python env:
! python --version
Python 3.6.10 :: Anaconda, Inc.
! pip list
Package Version
--------------- -------------------
certifi 2020.4.5.1
Cython 0.29.17
mkl-fft 1.0.15
mkl-random 1.1.0
mkl-service 2.3.0
numpy 1.18.1
pandas 1.0.3
pip 20.0.2
python-dateutil 2.8.1
pytz 2020.1
setuptools 46.1.3.post20200330
six 1.14.0
wheel 0.34.2
! git clone https://github.com/dwgoon/jpegio.git
...
Resolving deltas: 100% (606/606), done.
When I run python setup.py install
I got
[LIBJPEG] libjpeg-turbo is used for the functionality of libjpeg.
DIR_LIBJPEG_HEADER: masked_my_path/jpegio/jpegio/libjpeg-turbo/mac_xx64/include
DIR_LIBJPEG_SOURCE: jpegio/libjpeg-turbo/mac_xx64/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 -Ianaconda3/envs/py3image/include -arch x86_64 -Ianaconda3/envs/py3image/include -arch x86_64 -I. -Ianaconda3/envs/py3image/lib/python3.6/site-packages/numpy/core/include -Imasked_my_path/jpegio -Imasked_my_path/jpegio/jpegio/libjpeg-turbo/mac_xx64/include -Imasked_my_path/jpegio/jpegio -Ianaconda3/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
jpegio/componentinfo.cpp:645:10: fatal error: 'jpeglib.h' file not found
#include "jpeglib.h"
^~~~~~~~~~~
1 error generated.
error: command 'gcc' failed with exit status 1
And then I manually copy all .h file from libjpeg/include/ to jpegio/jepegio (I have no idea if it is right to copy and past them there ).
I got
[LIBJPEG] libjpeg-turbo is used for the functionality of libjpeg.
DIR_LIBJPEG_HEADER: my_masked_path/jpegio/jpegio/libjpeg-turbo/mac_xx64/include
DIR_LIBJPEG_SOURCE: jpegio/libjpeg-turbo/mac_xx64/src
running install
running bdist_egg
running 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
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
copying jpegio/jpeglib.h -> build/lib.macosx-10.9-x86_64-3.6/jpegio
copying jpegio/jerror.h -> build/lib.macosx-10.9-x86_64-3.6/jpegio
copying jpegio/jmemsys.h -> build/lib.macosx-10.9-x86_64-3.6/jpegio
copying jpegio/jconfig.h -> build/lib.macosx-10.9-x86_64-3.6/jpegio
copying jpegio/jmorecfg.h -> build/lib.macosx-10.9-x86_64-3.6/jpegio
copying jpegio/jdct.h -> build/lib.macosx-10.9-x86_64-3.6/jpegio
copying jpegio/jversion.h -> build/lib.macosx-10.9-x86_64-3.6/jpegio
copying jpegio/jinclude.h -> build/lib.macosx-10.9-x86_64-3.6/jpegio
copying jpegio/jpegint.h -> build/lib.macosx-10.9-x86_64-3.6/jpegio
running build_ext
building 'jpegio.componentinfo' 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 -Imy_masked_path/jpegio -Imy_masked_path/jpegio/jpegio/libjpeg-turbo/mac_xx64/include -Imy_masked_path/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 -Imy_masked_path/jpegio -Imy_masked_path/jpegio/jpegio/libjpeg-turbo/mac_xx64/include -Imy_masked_path/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 -Imy_masked_path/jpegio -Imy_masked_path/jpegio/jpegio/libjpeg-turbo/mac_xx64/include -Imy_masked_path/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 -Lmy_masked_path/jpegio/jpegio/libjpeg-turbo/mac_xx64/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
ld: warning: directory not found for option '-Lmy_masked_path/jpegio/jpegio/libjpeg-turbo/mac_xx64/lib'
ld: library not found for -ljpeg
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'g++' failed with exit status 1
Thanks for your report. I have fixed a typo in setup.py
. Try to install again, please.
I encountered the following problem when I run
python setup.py install
If I manually cp .h file from libjpeg/include/.h to jpegio/jepegio, I will get the following error