CuPy installatioin fails on Mac OS X 10.13.6 using pip - cupy

On MacOS HighSierra 10.13.6 with Python 3.5.7 and Cuda 10.1
Both
pip3.5 install cupy-cuda101
and
pip3.5 install cupy
fail, with different issues.
First attempt:
pip3.5 install cupy-cuda101 -vvvv
Collecting cupy-cuda101
1 location(s) to search for versions of cupy-cuda101:
* https://pypi.org/simple/cupy-cuda101/
Getting page https://pypi.org/simple/cupy-cuda101/
Looking up "https://pypi.org/simple/cupy-cuda101/" in the cache
Request header has "max_age" as 0, cache bypassed
Starting new HTTPS connection (1): pypi.org:443
https://pypi.org:443 "GET /simple/cupy-cuda101/ HTTP/1.1" 304 0
Analyzing links from page https://pypi.org/simple/cupy-cuda101/
Skipping link https://files.pythonhosted.org/packages/7c/cb/94b7aafd2344daf41c13bd152db14ed7eb2928be62575bc1421d94fbb490/cupy_cuda101-5.4.0-cp27-cp27mu-manylinux1_x86_64.whl#sha256=c422b46fc22232578d82168d73d2fd45d4ae303adad9e9e2bb6a60f6984e0438 (from https://pypi.org/simple/cupy-cuda101/); it is not compatible with this Python
[last line repeated for all ...]
ERROR: Could not find a version that satisfies the requirement cupy-cuda101 (from versions: none)
Cleaning up...
Removed build tracker '/private/var/folders/bz/cv2cs9y14qx6s5qf4hkz08s00000gn/T/pip-req-tracker-gfr00q13'
ERROR: No matching distribution found for cupy-cuda101
Exception information:
Traceback (most recent call last):
File "/usr/local/lib/python3.5/site-packages/pip/_internal/cli/base_command.py", line 178, in main
status = self.run(options, args)
File "/usr/local/lib/python3.5/site-packages/pip/_internal/commands/install.py", line 352, in run
resolver.resolve(requirement_set)
File "/usr/local/lib/python3.5/site-packages/pip/_internal/resolve.py", line 131, in resolve
self._resolve_one(requirement_set, req)
File "/usr/local/lib/python3.5/site-packages/pip/_internal/resolve.py", line 294, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "/usr/local/lib/python3.5/site-packages/pip/_internal/resolve.py", line 242, in _get_abstract_dist_for
self.require_hashes
File "/usr/local/lib/python3.5/site-packages/pip/_internal/operations/prepare.py", line 282, in prepare_linked_requirement
req.populate_link(finder, upgrade_allowed, require_hashes)
File "/usr/local/lib/python3.5/site-packages/pip/_internal/req/req_install.py", line 198, in populate_link
self.link = finder.find_requirement(self, upgrade)
File "/usr/local/lib/python3.5/site-packages/pip/_internal/index.py", line 792, in find_requirement
'No matching distribution found for %s' % req
pip._internal.exceptions.DistributionNotFound: No matching distribution found for cupy-cuda101
2nd attempt:
pip3.5 install cupy -vvvv
[...]
************************************************************
* CuPy Configuration Summary *
************************************************************
Build Environment:
Include directories: ['/usr/local/cuda/include']
Library directories: ['/usr/local/cuda/lib', '/usr/local/cuda/lib']
nvcc command : ['/usr/local/cuda/bin/nvcc']
Environment Variables:
CFLAGS : (none)
LDFLAGS : (none)
LIBRARY_PATH : (none)
CUDA_PATH : (none)
NVTOOLSEXT_PATH : (none)
NVCC : (none)
Modules:
cuda : Yes (version 10010)
cudnn : No
-> Include files not found: ['cudnn.h']
-> Check your CFLAGS environment variable.
nccl : No
-> Include files not found: ['nccl.h']
-> Check your CFLAGS environment variable.
cusolver : Yes
nvtx : Yes
thrust : Yes
WARNING: Some modules could not be configured.
CuPy will be installed without these modules.
Please refer to the Installation Guide for details:
https://docs-cupy.chainer.org/en/stable/install.html
************************************************************
[...]
copying cupy/cuda/cupy_thrust.cu -> build/lib.macosx-10.13-x86_64-3.5/cupy/cuda
running build_ext
building 'cupy.core._dtype' extension
creating build/temp.macosx-10.13-x86_64-3.5
creating build/temp.macosx-10.13-x86_64-3.5/cupy
creating build/temp.macosx-10.13-x86_64-3.5/cupy/core
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -D_FORCE_INLINES=1 -I/usr/local/cuda/include -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python35/3.5.7_1/Frameworks/Python.framework/Versions/3.5/include/python3.5m -c cupy/core/_dtype.cpp -o build/temp.macosx-10.13-x86_64-3.5/cupy/core/_dtype.o
cupy/core/_dtype.cpp:3068:52: warning: code will never be executed [-Wunreachable-code]
} else if (PY_VERSION_HEX >= 0x030700A0 && flag == (METH_FASTCALL | METH_KEYWORDS)) {
^~~~
cupy/core/_dtype.cpp:3068:38: note: silence by adding parentheses to mark code as explicitly dead
} else if (PY_VERSION_HEX >= 0x030700A0 && flag == (METH_FASTCALL | METH_KEYWORDS)) {
^
/* DISABLES CODE */ ( )
1 warning generated.
clang++ -bundle -undefined dynamic_lookup -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk build/temp.macosx-10.13-x86_64-3.5/cupy/core/_dtype.o -L/usr/local/cuda/lib -L/usr/local/cuda/lib -L/usr/local/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/sqlite/lib -L/usr/local/cuda/lib -L/usr/local/cuda/lib -lcublas -lcuda -lcudart -lcufft -lcurand -lcusparse -lnvrtc -o build/lib.macosx-10.13-x86_64-3.5/cupy/core/_dtype.cpython-35m-darwin.so -Wl,-rpath,/usr/local/cuda/lib,-rpath,/usr/local/cuda/lib -mmacosx-version-min=10.5
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 [-Wdeprecated]
ld: library not found for -lstdc++
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'clang++' failed with exit status 1
error
ERROR: Failed building wheel for cupy
[...]
Any ideas what I'm doing wrong?

Update: Removed the Homebrew version of python 3.5 and installed the latest python 3.7 version using a conda installer and
pip install cupy
was successful.

Related

can't MAKE tensorflow Raspberry pi examples

I installed tensorflow on the Raspberry Pi 3, running Jessie and did that in two ways, via the .whl file / pip install for Python 2.7.:
https://github.com/samjabrahams/tensorflow-on-raspberry-pi
as well as a full compile via:
https://github.com/tensorflow/tensorflow/tree/master/tensorflow/contrib/makefile
Both installs (I did them on different OS images) where successfull and went through without error.
Next, I wanted to compile the official Raspberry Pi examples from tensorflow's git repository:
https://github.com/tensorflow/tensorflow/tree/master/tensorflow/contrib/pi_examples
However, none of the examples does compile (neither the camera example nor the image recognition), both give the same error and Google doesn't tell me anything:
make -f tensorflow/contrib/pi_examples/camera/Makefile gcc --std=c++11
-O0 -I/usr/local/include -I. -I/home/pi/tensorflow/tensorflow/contrib/pi_examples/camera/../../makefile/downloads
-I/home/pi/tensorflow/tensorflow/contrib/pi_examples/camera/../../makefile/downloads/eigen/
-I/home/pi/tensorflow/tensorflow/contrib/pi_examples/camera/../../makefile/gen/proto/
-I/home/pi/tensorflow/tensorflow/contrib/pi_examples/camera/../../makefile/gen/proto_text/
-c tensorflow/contrib/pi_examples/camera/camera.cc -o /home/pi/tensorflow/tensorflow/contrib/pi_examples/camera/gen/obj/tensorflow/contrib/pi_examples/camera/camera.o
In file included from ./tensorflow/core/platform/mutex.h:31:0,
from ./tensorflow/core/framework/variant.h:31,
from ./tensorflow/core/framework/allocator.h:26,
from ./tensorflow/core/framework/tensor.h:20,
from tensorflow/contrib/pi_examples/camera/camera.cc:33:
./tensorflow/core/platform/default/mutex.h:25:22: fatal error:
nsync_cv.h: No such file or directory #include "nsync_cv.h"
^ compilation terminated. tensorflow/contrib/pi_examples/camera/Makefile:80: recipe for target
'/home/pi/tensorflow/tensorflow/contrib/pi_examples/camera/gen/obj/tensorflow/contrib/pi_examples/camera/camera.o'
failed make: ***
[/home/pi/tensorflow/tensorflow/contrib/pi_examples/camera/gen/obj/tensorflow/contrib/pi_examples/camera/camera.o]
Error 1
as well as:
make -f tensorflow/contrib/pi_examples/label_image/Makefile gcc
--std=c++11 -O0 -I/usr/local/include -I. -I/home/pi/tensorflow/tensorflow/contrib/pi_examples/label_image/../../makefile/downloads
-I/home/pi/tensorflow/tensorflow/contrib/pi_examples/label_image/../../makefile/downloads/eigen/
-I/home/pi/tensorflow/tensorflow/contrib/pi_examples/label_image/../../makefile/gen/proto/
-I/home/pi/tensorflow/tensorflow/contrib/pi_examples/label_image/../../makefile/gen/proto_text/
-c tensorflow/contrib/pi_examples/label_image/label_image.cc -o /home/pi/tensorflow/tensorflow/contrib/pi_examples/label_image/gen/obj/tensorflow/contrib/pi_examples/label_image/label_image.o
In file included from ./tensorflow/core/platform/mutex.h:31:0,
from ./tensorflow/core/framework/variant.h:31,
from ./tensorflow/core/framework/allocator.h:26,
from ./tensorflow/core/framework/tensor.h:20,
from tensorflow/contrib/pi_examples/label_image/label_image.cc:33:
./tensorflow/core/platform/default/mutex.h:25:22: fatal error:
nsync_cv.h: No such file or directory #include "nsync_cv.h"
^ compilation terminated. tensorflow/contrib/pi_examples/label_image/Makefile:79: recipe for
target
'/home/pi/tensorflow/tensorflow/contrib/pi_examples/label_image/gen/obj/tensorflow/contrib/pi_examples/label_image/label_image.o'
failed make: ***
[/home/pi/tensorflow/tensorflow/contrib/pi_examples/label_image/gen/obj/tensorflow/contrib/pi_examples/label_image/label_image.o]
Error 1
How can I locate / add / compile "nsync_cv.h"?
And btw:
export HOST_NSYNC_LIB=`tensorflow/contrib/makefile/compile_nsync.sh`
gives me:
g++ -M -std=c++11 -DNSYNC_USE_CPP11_TIMEPOINT -DNSYNC_ATOMIC_CPP11
-I../../platform/c++11 -I../../platform/gcc -I../../platform/posix -pthread -I../../public -I../../internal ../../internal/*.c ../../testing/*.c ../../platform/c++11/src/nsync_semaphore_mutex.cc
../../platform/c++11/src/per_thread_waiter.cc
../../platform/c++11/src/yield.cc
../../platform/c++11/src/time_rep_timespec.cc
../../platform/c++11/src/nsync_panic.cc \
../../platform/c++11/src/start_thread.cc > dependfile make: 'nsync.a' is up to date.
I once compiled tensorflow with the makefile on a nvidia Jetson TX1 and I could compile and run the examples by adding some lines to the Makefiles of the examples:
after line 18:
NSYNCLIBDIR := $(TFMAKEFILE_DIR)/downloads/nsync/builds/default.linux.c++11 !!!change folder default.linux.c++11 to where your libnsync.a is!!!
NSYNCLIBS := $(NSYNCLIBDIR)/libnsync.a
after line 26:
NSYNC := $(TFMAKEFILE_DIR)/downloads/nsync/public/
after line 36:
-L$(NSYNCLIBDIR) \
after line 43:
-I$(NSYNC) \
after line 51:
-lnsync \
change line 72 to:
$(EXECUTABLE_NAME): $(EXECUTABLE_OBJS) $(TFLIBS) $(NSYNCLIBS)
Hope it works with that changes, good luck :)

error while trying to install tesserocr

I keep getting the same error when I try to install
(env) vagrant#vagrant:~$ pip install tesserocr
Collecting tesserocr
Using cached tesserocr-2.1.3.tar.gz
Building wheels for collected packages: tesserocr
Running setup.py bdist_wheel for tesserocr ... error
Complete output from command /home/vagrant/src/env/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-4K2D6A/tesserocr/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmp5p5G1lpip-wheel- --python-tag cp27:
running bdist_wheel
running build
running build_ext
Failed to extract tesseract version from executable: [Errno 2] No such file or directory
Supporting tesseract v3.04.00
Building with configs: {'libraries': ['tesseract', 'lept'], 'cython_compile_time_env': {'TESSERACT_VERSION': 197632}}
cythoning tesserocr.pyx to tesserocr.cpp
building 'tesserocr' extension
creating build
creating build/temp.linux-x86_64-2.7
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c tesserocr.cpp -o build/temp.linux-x86_64-2.7/tesserocr.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
tesserocr.cpp:446:34: fatal error: leptonica/allheaders.h: No such file or directory
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Failed building wheel for tesserocr
Running setup.py clean for tesserocr
Failed to build tesserocr
Installing collected packages: tesserocr
Running setup.py install for tesserocr ... error
Complete output from command /home/vagrant/src/env/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-4K2D6A/tesserocr/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-mePzAW-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/vagrant/src/env/include/site/python2.7/tesserocr:
running install
running build
running build_ext
Failed to extract tesseract version from executable: [Errno 2] No such file or directory
Supporting tesseract v3.04.00
Building with configs: {'libraries': ['tesseract', 'lept'], 'cython_compile_time_env': {'TESSERACT_VERSION': 197632}}
skipping 'tesserocr.cpp' Cython extension (up-to-date)
building 'tesserocr' extension
creating build
creating build/temp.linux-x86_64-2.7
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c tesserocr.cpp -o build/temp.linux-x86_64-2.7/tesserocr.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
tesserocr.cpp:446:34: fatal error: leptonica/allheaders.h: No such file or directory
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/home/vagrant/src/env/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-4K2D6A/tesserocr/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-mePzAW-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/vagrant/src/env/include/site/python2.7/tesserocr" failed with error code 1 in /tmp/pip-build-4K2D6A/tesserocr/
Sachin System Error:
pip install tesserocr
Collecting tesserocr
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning.
SNIMissingWarning
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Using cached tesserocr-2.1.3.tar.gz
Building wheels for collected packages: tesserocr
Running setup.py bdist_wheel for tesserocr ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-YcBV5a/tesserocr/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpRrPD1Vpip-wheel- --python-tag cp27:
running bdist_wheel
running build
running build_ext
pkg-config failed to find tesseract/lep libraries: Package tesseract was not found in the pkg-config search path.
Perhaps you should add the directory containing `tesseract.pc'
to the PKG_CONFIG_PATH environment variable
No package 'tesseract' found
Supporting tesseract v3.03
Building with configs: {'libraries': ['tesseract', 'lept'], 'cython_compile_time_env': {'TESSERACT_VERSION': 771}}
cythoning tesserocr.pyx to tesserocr.cpp
building 'tesserocr' extension
creating build
creating build/temp.linux-x86_64-2.7
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c tesserocr.cpp -o build/temp.linux-x86_64-2.7/tesserocr.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
tesserocr.cpp: In function ‘PyObject* __pyx_pf_9tesserocr_14PyPageIterator_20SetBoundingBoxComponents(__pyx_obj_9tesserocr_PyPageIterator*, bool, bool)’:
tesserocr.cpp:4622:25: error: ‘class tesseract::PageIterator’ has no member named ‘SetBoundingBoxComponents’
__pyx_v_self->_piter->SetBoundingBoxComponents(__pyx_v_include_upper_dots, __pyx_v_include_lower_dots);
^
tesserocr.cpp: In function ‘PyObject* __pyx_pf_9tesserocr_14PyPageIterator_34GetImage(__pyx_obj_9tesserocr_PyPageIterator*, tesseract::PageIteratorLevel, int, PyObject*)’:
tesserocr.cpp:5854:125: error: no matching function for call to ‘tesseract::PageIterator::GetImage(tesseract::PageIteratorLevel&, int&, Pix*&, int*, int*)’
__pyx_v_pix = __pyx_v_self->_piter->GetImage(__pyx_v_level, __pyx_v_padding, __pyx_v_opix, (&__pyx_v_left), (&__pyx_v_top));
^
tesserocr.cpp:5854:125: note: candidate is:
In file included from tesserocr.cpp:456:0:
/usr/include/tesseract/pageiterator.h:239:8: note: Pix* tesseract::PageIterator::GetImage(tesseract::PageIteratorLevel, int, int*, int*) const
Pix* GetImage(PageIteratorLevel level, int padding,
^
/usr/include/tesseract/pageiterator.h:239:8: note: candidate expects 4 arguments, 5 provided
tesserocr.cpp: In function ‘PyObject* __pyx_pf_9tesserocr_13PyTessBaseAPI_74AnalyseLayout(__pyx_obj_9tesserocr_PyTessBaseAPI*, bool)’:
tesserocr.cpp:16256:83: error: no matching function for call to ‘tesseract::TessBaseAPI::AnalyseLayout(bool&)’
__pyx_v_piter = __pyx_v_self->_baseapi.AnalyseLayout(__pyx_v_merge_similar_words);
^
tesserocr.cpp:16256:83: note: candidate is:
In file included from tesserocr.cpp:461:0:
/usr/include/tesseract/baseapi.h:489:17: note: tesseract::PageIterator* tesseract::TessBaseAPI::AnalyseLayout()
PageIterator* AnalyseLayout();
^
/usr/include/tesseract/baseapi.h:489:17: note: candidate expects 0 arguments, 1 provided
tesserocr.cpp: In function ‘tesseract::TessResultRenderer* __pyx_f_9tesserocr_13PyTessBaseAPI__get_renderer(__pyx_obj_9tesserocr_PyTessBaseAPI*, __pyx_t_9tesseract_cchar_t*)’:
tesserocr.cpp:16600:88: error: no matching function for call to ‘tesseract::TessHOcrRenderer::TessHOcrRenderer(__pyx_t_9tesseract_cchar_t*&, bool&)’
__pyx_t_2 = new tesseract::TessHOcrRenderer(__pyx_v_outputbase, __pyx_v_font_info);
^
tesserocr.cpp:16600:88: note: candidates are:
In file included from tesserocr.cpp:459:0:
/usr/include/tesseract/renderer.h:175:3: note: tesseract::TessHOcrRenderer::TessHOcrRenderer()
TessHOcrRenderer();
^
/usr/include/tesseract/renderer.h:175:3: note: candidate expects 0 arguments, 2 provided
/usr/include/tesseract/renderer.h:173:16: note: tesseract::TessHOcrRenderer::TessHOcrRenderer(const tesseract::TessHOcrRenderer&)
class TESS_API TessHOcrRenderer : public TessResultRenderer {
^
/usr/include/tesseract/renderer.h:173:16: note: candidate expects 1 argument, 2 provided
tesserocr.cpp:16643:106: error: no matching function for call to ‘tesseract::TessPDFRenderer::TessPDFRenderer(__pyx_t_9tesseract_cchar_t*&, const char*)’
__pyx_t_3 = new tesseract::TessPDFRenderer(__pyx_v_outputbase, __pyx_v_self->_baseapi.GetDatapath());
^
tesserocr.cpp:16643:106: note: candidates are:
In file included from tesserocr.cpp:459:0:
/usr/include/tesseract/renderer.h:188:3: note: tesseract::TessPDFRenderer::TessPDFRenderer(const char*)
TessPDFRenderer(const char *datadir);
^
/usr/include/tesseract/renderer.h:188:3: note: candidate expects 1 argument, 2 provided
/usr/include/tesseract/renderer.h:186:16: note: tesseract::TessPDFRenderer::TessPDFRenderer(const tesseract::TessPDFRenderer&)
class TESS_API TessPDFRenderer : public TessResultRenderer {
^
/usr/include/tesseract/renderer.h:186:16: note: candidate expects 1 argument, 2 provided
tesserocr.cpp:16727:69: error: no matching function for call to ‘tesseract::TessUnlvRenderer::TessUnlvRenderer(__pyx_t_9tesseract_cchar_t*&)’
__pyx_t_4 = new tesseract::TessUnlvRenderer(__pyx_v_outputbase);
^
tesserocr.cpp:16727:69: note: candidates are:
In file included from tesserocr.cpp:459:0:
/usr/include/tesseract/renderer.h:227:3: note: tesseract::TessUnlvRenderer::TessUnlvRenderer()
TessUnlvRenderer();
^
/usr/include/tesseract/renderer.h:227:3: note: candidate expects 0 arguments, 1 provided
/usr/include/tesseract/renderer.h:225:16: note: tesseract::TessUnlvRenderer::TessUnlvRenderer(const tesseract::TessUnlvRenderer&)
class TESS_API TessUnlvRenderer : public TessResultRenderer {
^
/usr/include/tesseract/renderer.h:225:16: note: no known conversion for argument 1 from ‘__pyx_t_9tesseract_cchar_t* {aka const char*}’ to ‘const tesseract::TessUnlvRenderer&’
tesserocr.cpp:16811:72: error: no matching function for call to ‘tesseract::TessBoxTextRenderer::TessBoxTextRenderer(__pyx_t_9tesseract_cchar_t*&)’
__pyx_t_5 = new tesseract::TessBoxTextRenderer(__pyx_v_outputbase);
^
tesserocr.cpp:16811:72: note: candidates are:
In file included from tesserocr.cpp:459:0:
/usr/include/tesseract/renderer.h:238:3: note: tesseract::TessBoxTextRenderer::TessBoxTextRenderer()
TessBoxTextRenderer();
^
/usr/include/tesseract/renderer.h:238:3: note: candidate expects 0 arguments, 1 provided
/usr/include/tesseract/renderer.h:236:16: note: tesseract::TessBoxTextRenderer::TessBoxTextRenderer(const tesseract::TessBoxTextRenderer&)
class TESS_API TessBoxTextRenderer : public TessResultRenderer {
^
/usr/include/tesseract/renderer.h:236:16: note: no known conversion for argument 1 from ‘__pyx_t_9tesseract_cchar_t* {aka const char*}’ to ‘const tesseract::TessBoxTextRenderer&’
tesserocr.cpp:16895:69: error: no matching function for call to ‘tesseract::TessTextRenderer::TessTextRenderer(__pyx_t_9tesseract_cchar_t*&)’
__pyx_t_6 = new tesseract::TessTextRenderer(__pyx_v_outputbase);
^
tesserocr.cpp:16895:69: note: candidates are:
In file included from tesserocr.cpp:459:0:
/usr/include/tesseract/renderer.h:164:3: note: tesseract::TessTextRenderer::TessTextRenderer()
TessTextRenderer();
^
/usr/include/tesseract/renderer.h:164:3: note: candidate expects 0 arguments, 1 provided
/usr/include/tesseract/renderer.h:162:16: note: tesseract::TessTextRenderer::TessTextRenderer(const tesseract::TessTextRenderer&)
class TESS_API TessTextRenderer : public TessResultRenderer {
^
/usr/include/tesseract/renderer.h:162:16: note: no known conversion for argument 1 from ‘__pyx_t_9tesseract_cchar_t* {aka const char*}’ to ‘const tesseract::TessTextRenderer&’
tesserocr.cpp: In function ‘PyObject* __pyx_pf_9tesserocr_13PyTessBaseAPI_108IsValidCharacter(__pyx_obj_9tesserocr_PyTessBaseAPI*, PyObject*)’:
tesserocr.cpp:19661:60: error: ‘class tesseract::TessBaseAPI’ has no member named ‘IsValidCharacter’
__pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_baseapi.IsValidCharacter(__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2161, __pyx_L1_error)
^
tesserocr.cpp:544:36: note: in definition of macro ‘__Pyx_PyBool_FromLong’
#define __Pyx_PyBool_FromLong(b) ((b) ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False))
^
tesserocr.cpp: In function ‘void inittesserocr()’:
tesserocr.cpp:25014:67: error: ‘PSM_RAW_LINE’ is not a member of ‘tesseract’
__pyx_t_2 = __Pyx_PyInt_From_enum__tesseract_3a__3a_PageSegMode(tesseract::PSM_RAW_LINE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 132, __pyx_L1_error)
^
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Failed building wheel for tesserocr
Running setup.py clean for tesserocr
Failed to build tesserocr
Installing collected packages: tesserocr
Running setup.py install for tesserocr ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-YcBV5a/tesserocr/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-KHSvyq-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_ext
pkg-config failed to find tesseract/lep libraries: Package tesseract was not found in the pkg-config search path.
Perhaps you should add the directory containing `tesseract.pc'
to the PKG_CONFIG_PATH environment variable
No package 'tesseract' found
Supporting tesseract v3.03
Building with configs: {'libraries': ['tesseract', 'lept'], 'cython_compile_time_env': {'TESSERACT_VERSION': 771}}
skipping 'tesserocr.cpp' Cython extension (up-to-date)
building 'tesserocr' extension
creating build
creating build/temp.linux-x86_64-2.7
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c tesserocr.cpp -o build/temp.linux-x86_64-2.7/tesserocr.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
tesserocr.cpp: In function ‘PyObject* __pyx_pf_9tesserocr_14PyPageIterator_20SetBoundingBoxComponents(__pyx_obj_9tesserocr_PyPageIterator*, bool, bool)’:
tesserocr.cpp:4622:25: error: ‘class tesseract::PageIterator’ has no member named ‘SetBoundingBoxComponents’
__pyx_v_self->_piter->SetBoundingBoxComponents(__pyx_v_include_upper_dots, __pyx_v_include_lower_dots);
^
tesserocr.cpp: In function ‘PyObject* __pyx_pf_9tesserocr_14PyPageIterator_34GetImage(__pyx_obj_9tesserocr_PyPageIterator*, tesseract::PageIteratorLevel, int, PyObject*)’:
tesserocr.cpp:5854:125: error: no matching function for call to ‘tesseract::PageIterator::GetImage(tesseract::PageIteratorLevel&, int&, Pix*&, int*, int*)’
__pyx_v_pix = __pyx_v_self->_piter->GetImage(__pyx_v_level, __pyx_v_padding, __pyx_v_opix, (&__pyx_v_left), (&__pyx_v_top));
^
tesserocr.cpp:5854:125: note: candidate is:
In file included from tesserocr.cpp:456:0:
/usr/include/tesseract/pageiterator.h:239:8: note: Pix* tesseract::PageIterator::GetImage(tesseract::PageIteratorLevel, int, int*, int*) const
Pix* GetImage(PageIteratorLevel level, int padding,
^
/usr/include/tesseract/pageiterator.h:239:8: note: candidate expects 4 arguments, 5 provided
tesserocr.cpp: In function ‘PyObject* __pyx_pf_9tesserocr_13PyTessBaseAPI_74AnalyseLayout(__pyx_obj_9tesserocr_PyTessBaseAPI*, bool)’:
tesserocr.cpp:16256:83: error: no matching function for call to ‘tesseract::TessBaseAPI::AnalyseLayout(bool&)’
__pyx_v_piter = __pyx_v_self->_baseapi.AnalyseLayout(__pyx_v_merge_similar_words);
^
tesserocr.cpp:16256:83: note: candidate is:
In file included from tesserocr.cpp:461:0:
/usr/include/tesseract/baseapi.h:489:17: note: tesseract::PageIterator* tesseract::TessBaseAPI::AnalyseLayout()
PageIterator* AnalyseLayout();
^
/usr/include/tesseract/baseapi.h:489:17: note: candidate expects 0 arguments, 1 provided
tesserocr.cpp: In function ‘tesseract::TessResultRenderer* __pyx_f_9tesserocr_13PyTessBaseAPI__get_renderer(__pyx_obj_9tesserocr_PyTessBaseAPI*, __pyx_t_9tesseract_cchar_t*)’:
tesserocr.cpp:16600:88: error: no matching function for call to ‘tesseract::TessHOcrRenderer::TessHOcrRenderer(__pyx_t_9tesseract_cchar_t*&, bool&)’
__pyx_t_2 = new tesseract::TessHOcrRenderer(__pyx_v_outputbase, __pyx_v_font_info);
^
tesserocr.cpp:16600:88: note: candidates are:
In file included from tesserocr.cpp:459:0:
/usr/include/tesseract/renderer.h:175:3: note: tesseract::TessHOcrRenderer::TessHOcrRenderer()
TessHOcrRenderer();
^
/usr/include/tesseract/renderer.h:175:3: note: candidate expects 0 arguments, 2 provided
/usr/include/tesseract/renderer.h:173:16: note: tesseract::TessHOcrRenderer::TessHOcrRenderer(const tesseract::TessHOcrRenderer&)
class TESS_API TessHOcrRenderer : public TessResultRenderer {
^
/usr/include/tesseract/renderer.h:173:16: note: candidate expects 1 argument, 2 provided
tesserocr.cpp:16643:106: error: no matching function for call to ‘tesseract::TessPDFRenderer::TessPDFRenderer(__pyx_t_9tesseract_cchar_t*&, const char*)’
__pyx_t_3 = new tesseract::TessPDFRenderer(__pyx_v_outputbase, __pyx_v_self->_baseapi.GetDatapath());
^
tesserocr.cpp:16643:106: note: candidates are:
In file included from tesserocr.cpp:459:0:
/usr/include/tesseract/renderer.h:188:3: note: tesseract::TessPDFRenderer::TessPDFRenderer(const char*)
TessPDFRenderer(const char *datadir);
^
/usr/include/tesseract/renderer.h:188:3: note: candidate expects 1 argument, 2 provided
/usr/include/tesseract/renderer.h:186:16: note: tesseract::TessPDFRenderer::TessPDFRenderer(const tesseract::TessPDFRenderer&)
class TESS_API TessPDFRenderer : public TessResultRenderer {
^
/usr/include/tesseract/renderer.h:186:16: note: candidate expects 1 argument, 2 provided
tesserocr.cpp:16727:69: error: no matching function for call to ‘tesseract::TessUnlvRenderer::TessUnlvRenderer(__pyx_t_9tesseract_cchar_t*&)’
__pyx_t_4 = new tesseract::TessUnlvRenderer(__pyx_v_outputbase);
^
tesserocr.cpp:16727:69: note: candidates are:
In file included from tesserocr.cpp:459:0:
/usr/include/tesseract/renderer.h:227:3: note: tesseract::TessUnlvRenderer::TessUnlvRenderer()
TessUnlvRenderer();
^
/usr/include/tesseract/renderer.h:227:3: note: candidate expects 0 arguments, 1 provided
/usr/include/tesseract/renderer.h:225:16: note: tesseract::TessUnlvRenderer::TessUnlvRenderer(const tesseract::TessUnlvRenderer&)
class TESS_API TessUnlvRenderer : public TessResultRenderer {
^
/usr/include/tesseract/renderer.h:225:16: note: no known conversion for argument 1 from ‘__pyx_t_9tesseract_cchar_t* {aka const char*}’ to ‘const tesseract::TessUnlvRenderer&’
tesserocr.cpp:16811:72: error: no matching function for call to ‘tesseract::TessBoxTextRenderer::TessBoxTextRenderer(__pyx_t_9tesseract_cchar_t*&)’
__pyx_t_5 = new tesseract::TessBoxTextRenderer(__pyx_v_outputbase);
^
tesserocr.cpp:16811:72: note: candidates are:
In file included from tesserocr.cpp:459:0:
/usr/include/tesseract/renderer.h:238:3: note: tesseract::TessBoxTextRenderer::TessBoxTextRenderer()
TessBoxTextRenderer();
^
/usr/include/tesseract/renderer.h:238:3: note: candidate expects 0 arguments, 1 provided
/usr/include/tesseract/renderer.h:236:16: note: tesseract::TessBoxTextRenderer::TessBoxTextRenderer(const tesseract::TessBoxTextRenderer&)
class TESS_API TessBoxTextRenderer : public TessResultRenderer {
^
/usr/include/tesseract/renderer.h:236:16: note: no known conversion for argument 1 from ‘__pyx_t_9tesseract_cchar_t* {aka const char*}’ to ‘const tesseract::TessBoxTextRenderer&’
tesserocr.cpp:16895:69: error: no matching function for call to ‘tesseract::TessTextRenderer::TessTextRenderer(__pyx_t_9tesseract_cchar_t*&)’
__pyx_t_6 = new tesseract::TessTextRenderer(__pyx_v_outputbase);
^
tesserocr.cpp:16895:69: note: candidates are:
In file included from tesserocr.cpp:459:0:
/usr/include/tesseract/renderer.h:164:3: note: tesseract::TessTextRenderer::TessTextRenderer()
TessTextRenderer();
^
/usr/include/tesseract/renderer.h:164:3: note: candidate expects 0 arguments, 1 provided
/usr/include/tesseract/renderer.h:162:16: note: tesseract::TessTextRenderer::TessTextRenderer(const tesseract::TessTextRenderer&)
class TESS_API TessTextRenderer : public TessResultRenderer {
^
/usr/include/tesseract/renderer.h:162:16: note: no known conversion for argument 1 from ‘__pyx_t_9tesseract_cchar_t* {aka const char*}’ to ‘const tesseract::TessTextRenderer&’
tesserocr.cpp: In function ‘PyObject* __pyx_pf_9tesserocr_13PyTessBaseAPI_108IsValidCharacter(__pyx_obj_9tesserocr_PyTessBaseAPI*, PyObject*)’:
tesserocr.cpp:19661:60: error: ‘class tesseract::TessBaseAPI’ has no member named ‘IsValidCharacter’
__pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_baseapi.IsValidCharacter(__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2161, __pyx_L1_error)
^
tesserocr.cpp:544:36: note: in definition of macro ‘__Pyx_PyBool_FromLong’
#define __Pyx_PyBool_FromLong(b) ((b) ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False))
^
tesserocr.cpp: In function ‘void inittesserocr()’:
tesserocr.cpp:25014:67: error: ‘PSM_RAW_LINE’ is not a member of ‘tesseract’
__pyx_t_2 = __Pyx_PyInt_From_enum__tesseract_3a__3a_PageSegMode(tesseract::PSM_RAW_LINE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 132, __pyx_L1_error)
^
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-YcBV5a/tesserocr/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-KHSvyq-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-YcBV5a/tesserocr/
Faced this problem today. It happens because we are missing these libraries
libleptonica-dev and libtesseract-dev
Solution is to install them using your package manager.
Ubuntu
apt-get install libleptonica-dev libtesseract-dev
Mac
pip install tesserocr
will auto install tesserocr and its dependent lib leptonica
solved the issue
My error was like:
Failed building wheel for tesserocr
(...)
Supporting tesseract v4.0.0
Building with configs: {'libraries': ['tesseract', 'lept'], 'cython_compile_time_env': {'TESSERACT_VERSION': 67108864}}
(...)
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.6m -c tesserocr.cpp -o build/temp.linux-x86_64-3.6/tesserocr.o -std=c++11 -DUSE_STD_NAMESPACE
tesserocr.cpp: In function 'PyObject* __pyx_pf_9tesserocr_16PyResultIterator_8GetBestLSTMSymbolChoices(__pyx_obj_9tesserocr_PyResultIterator*)':
tesserocr.cpp:12192:43: error: 'class tesseract::ResultIterator' has no member named 'GetBestLSTMSymbolChoices'
__pyx_v_output = (__pyx_v_self->_riter->GetBestLSTMSymbolChoices()[0]);
^~~~~~~~~~~~~~~~~~~~~~~~
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-s6f5ze1q/tesserocr/setup.py';
f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))"
install --record /tmp/pip-lopr6cjz-record/install-record.txt --single-version-externally-managed --compile"
failed with error code 1 in /tmp/pip-build-s6f5ze1q/tesserocr/
I resolved it with additional installation of pkg-config library.
apt-get install libleptonica-dev libtesseract-dev \
tesseract-ocr tesseract-ocr-eng \
pkg-config
If you are using a linux(Debian based like Ubuntu 14.04) system you would like to upgrade your Tesseract version. Apparently in Ubuntu 14.04 default Tesseract version is 3.03 which is not supported by tesserocr. You have to build from source with some newer Tesseract versions like 4.00 or 3.05.But in newer OS versions this should not be a problem.
Just follow the link for the installation
Installing Tesserocr with Tesseract 3.04+

Installing SCIP on OSX: outdated libisl?

I'm trying to install SCIP on OSX mavericks. I've downloaded the tarball here, extracted it, and have tried to compile it using
make scipoptlib GMP=false ZLIB=false READLINE=false SHARED=true
This gives me error 1 below. My interpretation of error 1 is that /usr/local/lib/libisl.10.dylib does not exist. That's correct: I have isl.0.14.1, located at /usr/local/Cellar/isl/0.14.1. And in fact I can't install isl.0.10.1, because the compiler options it expects don't work with the current version of gcc (I think; see error 2 below).
Can I tell SCIP to use isl.0.14.1, and if so, how?
**error 1:**
** Extracting SoPlex archive "/Applications/scipoptsuite-3.2.0/soplex-2.2.0.tgz".
** Extracting ZIMPL archive "/Applications/scipoptsuite-3.2.0/zimpl-3.3.3.tgz".
** Extracting SCIP archive "/Applications/scipoptsuite-3.2.0/scip-3.2.0.tgz".
** compile libraries statically with compiler flag -fPIC
rm -rf obj/O.darwin.x86_64.gnu.normal.opt/* bin/zimpl-3.3.3.darwin.x86_64.gnu.normal.opt lib/libzimpl-3.3.3.darwin.x86_64.gnu.opt.a lib/libzimpl-3.3.3.darwin.x86_64.gnu.opt.dbl.a lib/libzimpl.darwin.x86_64.gnu.opt.a bin/zimpl.darwin.x86_64.gnu.opt bin/zimpl
** Creating directory "/Applications/scipoptsuite-3.2.0/scip-3.2.0/lib".
** Creating directory "/Applications/scipoptsuite-3.2.0/scip-3.2.0/lib/zimplinc".
** Building SoPlex library "/Applications/scipoptsuite-3.2.0/soplex-2.2.0/lib/libsoplex.darwin.x86_64.gnu.opt.a".
-> compiling obj/O.darwin.x86_64.gnu.opt/lib/changesoplex.o
dyld: Library not loaded: /usr/local/lib/libisl.10.dylib
Referenced from: /usr/local/Cellar/gcc/4.9.1/libexec/gcc/x86_64-apple-darwin13.2.0/4.9.1/cc1plus
Reason: image not found
g++: internal compiler error: Trace/BPT trap: 5 (program cc1plus)
make[4]: *** [obj/O.darwin.x86_64.gnu.opt/lib/changesoplex.o] Abort trap: 6
make[3]: [makelibfile] Error 2 (ignored)
-> compiling obj/O.darwin.x86_64.gnu.opt/lib/changesoplex.o
dyld: Library not loaded: /usr/local/lib/libisl.10.dylib
Referenced from: /usr/local/Cellar/gcc/4.9.1/libexec/gcc/x86_64-apple-darwin13.2.0/4.9.1/cc1plus
Reason: image not found
g++: internal compiler error: Trace/BPT trap: 5 (program cc1plus)
make[4]: *** [obj/O.darwin.x86_64.gnu.opt/lib/changesoplex.o] Abort trap: 6
make[3]: [all] Error 2 (ignored)
** ZIMPL support disabled.
** Creating necessary soft-links.
** Building SCIP libraries and executable.
-> generating necessary links
- Current settings: LPS=spx OSTYPE=darwin ARCH=x86_64 COMP=gnu SUFFIX= ZIMPL=false ZIMPLOPT=opt IPOPT=false IPOPTOPT=opt EXPRINT=cppad GAMS=false
* SCIP needs some softlinks to external programs, in particular, LP-solvers.
* Please insert the paths to the corresponding directories/libraries below.
* The links will be installed in the 'lib' directory.
* For more information and if you experience problems see the INSTALL file.
-> "spxinc" is the path to the SoPlex "src" directory, e.g., "../../soplex/src".
-> "libsoplex.*" is the path to the SoPlex library, e.g., "../../soplex/lib/libsoplex.darwin.x86_64.gnu.opt.a"
-> compiling obj/O.darwin.x86_64.gnu.opt/lib/scip/branch_allfullstrong.o
dyld: Library not loaded: /usr/local/lib/libisl.10.dylib
Referenced from: /usr/local/Cellar/gcc/4.9.1/libexec/gcc/x86_64-apple-darwin13.2.0/4.9.1/cc1
Reason: image not found
gcc: internal compiler error: Trace/BPT trap: 5 (program cc1)
make[4]: *** [obj/O.darwin.x86_64.gnu.opt/lib/scip/branch_allfullstrong.o] Abort trap: 6
make[3]: *** [makesciplibfile] Error 2
make[2]: *** [scipbinary] Error 2
make[1]: *** [scipbinary] Error 2
make: *** [scipoptlib] Error 2
error 2, produced by running ./configure in libisl.10 directory:
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by isl configure 0.10, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ ./configure
## --------- ##
## Platform. ##
## --------- ##
hostname = dhcp-143-183.caltech.edu
uname -m = x86_64
uname -r = 13.4.0
uname -s = Darwin
uname -v = Darwin Kernel Version 13.4.0: Wed Mar 18 16:20:14 PDT 2015; root:xnu-2422.115.14~1/RELEASE_X86_64
/usr/bin/uname -p = i386
/bin/uname -X = unknown
/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = Mach kernel version:
Darwin Kernel Version 13.4.0: Wed Mar 18 16:20:14 PDT 2015; root:xnu-2422.115.14~1/RELEASE_X86_64
Kernel configured for up to 4 processors.
2 processors are physically available.
4 processors are logically available.
Processor type: i486 (Intel 80486)
Processors active: 0 1 2 3
Primary memory available: 16.00 gigabytes
Default processor set: 327 tasks, 1905 threads, 4 processors
Load average: 4.32, Mach factor: 0.47
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /Users/madeleine/anaconda/bin/
PATH: /usr/local/bin
PATH: /usr/bin
PATH: /bin
PATH: /usr/sbin
PATH: /sbin
PATH: /usr/local/bin
PATH: /opt/X11/bin
PATH: /usr/local/go/bin
PATH: /usr/texbin
PATH: /usr/bin
PATH: /bin
PATH: /usr/sbin
PATH: /sbin
PATH: /opt/local/bin
PATH: /opt/local/sbin
PATH: /Applications/spark-0.9.1-bin-hadoop2/bin
PATH: /Applications/Julia-0.3.8.app/Contents/Resources/julia/bin
## ----------- ##
## Core tests. ##
## ----------- ##
configure:2762: checking for a BSD-compatible install
configure:2830: result: /usr/bin/install -c
configure:2841: checking whether build environment is sane
configure:2891: result: yes
configure:3032: checking for a thread-safe mkdir -p
configure:3071: result: ./install-sh -c -d
configure:3084: checking for gawk
configure:3114: result: no
configure:3084: checking for mawk
configure:3114: result: no
configure:3084: checking for nawk
configure:3114: result: no
configure:3084: checking for awk
configure:3100: found /usr/bin/awk
configure:3111: result: awk
configure:3122: checking whether make sets $(MAKE)
configure:3144: result: yes
configure:3287: checking for gcc
configure:3303: found /usr/local/bin/gcc
configure:3314: result: gcc
configure:3543: checking for C compiler version
configure:3552: gcc --version >&5
gcc (Homebrew gcc 4.9.1) 4.9.1
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
configure:3563: $? = 0
configure:3552: gcc -v >&5
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc/4.9.1/libexec/gcc/x86_64-apple-darwin13.2.0/4.9.1/lto-wrapper
Target: x86_64-apple-darwin13.2.0
Configured with: ../configure --build=x86_64-apple-darwin13.2.0 --prefix=/usr/local/Cellar/gcc/4.9.1 --enable-languages=c,c++,objc,obj-c++,fortran --program-suffix=-4.9 --with-gmp=/usr/local/opt/gmp --with-mpfr=/usr/local/opt/mpfr --with-mpc=/usr/local/opt/libmpc --with-cloog=/usr/local/opt/cloog --with-isl=/usr/local/opt/isl --with-system-zlib --enable-version-specific-runtime-libs --enable-libstdcxx-time=yes --enable-stage1-checking --enable-checking=release --enable-lto --disable-werror --with-pkgversion='Homebrew gcc 4.9.1' --with-bugurl=https://github.com/Homebrew/homebrew/issues --enable-plugin --disable-nls --enable-multilib
Thread model: posix
gcc version 4.9.1 (Homebrew gcc 4.9.1)
configure:3563: $? = 0
configure:3552: gcc -V >&5
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:3563: $? = 1
configure:3552: gcc -qversion >&5
gcc: error: unrecognized command line option '-qversion'
gcc: fatal error: no input files
compilation terminated.
configure:3563: $? = 1
configure:3583: checking whether the C compiler works
configure:3605: gcc conftest.c >&5
dyld: Library not loaded: /usr/local/lib/libisl.10.dylib
Referenced from: /usr/local/Cellar/gcc/4.9.1/libexec/gcc/x86_64-apple-darwin13.2.0/4.9.1/cc1
Reason: image not found
gcc: internal compiler error: Trace/BPT trap: 5 (program cc1)
./configure: line 3607: 9063 Abort trap: 6 $CC $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5
I can't see where or why the SCIP Optimization Suite would be using isl. To be precise, in your case not SCIP fails to compile but SoPlex. Have you checked whether you can compile SoPlex alone? Just go into the subdirectory and type make or make SHARED=true GMP=false ZLIB=false to match the original command.
Have you compiled some other code with your compiler? It may also be that your gcc itself is broken.
I have the impression that the C++ compiler itself is broken:
dyld: Library not loaded: /usr/local/lib/libisl.10.dylib
Referenced from: /usr/local/Cellar/gcc/4.9.1/libexec/gcc/x86_64-apple-darwin13.2.0/4.9.1/cc1plus
Maybe try a simple (hello-world) C++ program first to test that the compiler itself is ok.

unable to `pip install numpy` on a specific machine

pip install numpy in a python virtualenv on my own Mac OSX machine and on another of my machine running Arch Linux works perfectly.
Unfortunately, the same command fails to work on a colleague's machine running Gentoo.
Here's the pip.log showing the error logs:-
building data_files sources
build_src: building npy-pkg config files
running build_py
copying numpy/version.py -> build/lib.linux-x86_64-2.7/numpy
copying build/src.linux-x86_64-2.7/numpy/__config__.py -> build/lib.linux-x86_64-2.7/numpy
copying build/src.linux-x86_64-2.7/numpy/distutils/__config__.py -> build/lib.linux-x86_64-2.7/numpy/distutils
running build_clib
customize UnixCCompiler
customize UnixCCompiler using build_clib
running build_ext
customize UnixCCompiler
customize UnixCCompiler using build_ext
customize GnuFCompiler
customize IntelFCompiler
customize LaheyFCompiler
customize PGroupFCompiler
customize AbsoftFCompiler
customize NAGFCompiler
customize VastFCompiler
customize CompaqFCompiler
customize IntelItaniumFCompiler
customize IntelEM64TFCompiler
customize Gnu95FCompiler
customize Gnu95FCompiler
customize Gnu95FCompiler using build_ext
building 'numpy.linalg.lapack_lite' extension
compiling C sources
C compiler: x86_64-pc-linux-gnu-gcc -pthread -O3 -march=native -pipe -fomit-frame-pointer -fno-ident -fPIC
compile options: '-DNO_ATLAS_INFO=1 -Inumpy/core/include -Ibuild/src.linux-x86_64-2.7/numpy/core/include/numpy -Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/include -I/usr/include/python2.7 -Ibuild/src.linux-x86_64-2.7/numpy/core/src/multiarray -Ibuild/src.linux-x86_64-2.7/numpy/core/src/umath -c'
x86_64-pc-linux-gnu-gcc: numpy/linalg/lapack_litemodule.c
x86_64-pc-linux-gnu-gcc: numpy/linalg/python_xerbla.c
/usr/bin/gfortran -Wall -s build/temp.linux-x86_64-2.7/numpy/linalg/lapack_litemodule.o build/temp.linux-x86_64-2.7/numpy/linalg/python_xerbla.o -L/usr/lib64 -L/usr/lib64 -Lbuild/temp.linux-x86_64-2.7 -llapack -lblas -lpython2.7 -lgfortran -o build/lib.linux-x86_64-2.7/numpy/linalg/lapack_lite.so
/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../lib64/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: ld returned 1 exit status
/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../lib64/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: ld returned 1 exit status
error: Command "/usr/bin/gfortran -Wall -s build/temp.linux-x86_64-2.7/numpy/linalg/lapack_litemodule.o build/temp.linux-x86_64-2.7/numpy/linalg/python_xerbla.o -L/usr/lib64 -L/usr/lib64 -Lbuild/temp.linux-x86_64-2.7 -llapack -lblas -lpython2.7 -lgfortran -o build/lib.linux-x86_64-2.7/numpy/linalg/lapack_lite.so" failed with exit status 1
----------------------------------------
Command /home/stefan/.virtualenvs/senatus_env/bin/python2.7 -c "import setuptools;__file__='/home/stefan/.virtualenvs/senatus_env/build/numpy/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-Ebkksh-record/install-record.txt --install-headers /home/stefan/.virtualenvs/senatus_env/include/site/python2.7 failed with error code 1 in /home/stefan/.virtualenvs/senatus_env/build/numpy
Exception information:
Traceback (most recent call last):
File "/home/stefan/.virtualenvs/senatus_env/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/basecommand.py", line 104, in main
status = self.run(options, args)
File "/home/stefan/.virtualenvs/senatus_env/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/commands/install.py", line 250, in run
requirement_set.install(install_options, global_options)
File "/home/stefan/.virtualenvs/senatus_env/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.py", line 1133, in install
requirement.install(install_options, global_options)
File "/home/stefan/.virtualenvs/senatus_env/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.py", line 577, in install
cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False)
File "/home/stefan/.virtualenvs/senatus_env/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/__init__.py", line 256, in call_subprocess
% (command_desc, proc.returncode, cwd))
InstallationError: Command /home/stefan/.virtualenvs/senatus_env/bin/python2.7 -c "import setuptools;__file__='/home/stefan/.virtualenvs/senatus_env/build/numpy/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-Ebkksh-record/install-record.txt --install-headers /home/stefan/.virtualenvs/senatus_env/include/site/python2.7 failed with error code 1 in /home/stefan/.virtualenvs/senatus_env/build/numpy
It appears that the gfortran on my colleague's machine does not play well with the numpy package he is trying to install in the virtualenv. Any idea why this might be so?
If CFLAGS, CXXFLAGS, or LDFLAGS are set, it could cause this. The problem is that those environment variables override the settings in the compile script, causing problems.
Just unset them for the invocation of the pip command and you should be all set.
It looks to me that setuptools is not working correctly, setuptools has been superceded by the python "dist" utility so you might want to install that and retry the installation.

Install MatPlotLib 1.2.x on OS X Lion 10.7.4 and Python 3.2.2

I asked a question a couple of days ago regarding installing numpy on the same system. Thankfully, I managed to solve that one myself but unfortunately I am now stuck trying to install matplotlib.
I first of all tried the current distributed version but had no luck with that so I thought i would download the git repository and try that. I have got this far:
changed the make.osx file so that it will work in Python 3:
import urllib -> import urllib.request
urllib.urlretrieve() -> urllib.request.urlretrieve()
Even after that I still had a problem with it not finding the freetype2 headers. I googled around and discovered that I could solve this by editing a line in setupext.py:
'darwin' : [], -> 'darwin' : ['/usr/local'],
However, I still get an error message when using the make.osx file. Here is how I am calling the file from Terminal:
sudo make -f make.osx PREFIX=/usr/local PYVERSION=3.2 fetch deps mpl_build mpl_install
I realise that matplotlib isn't officially supported on Python 3 yet but I thought that maybe someone somewhere as at least managed to get it to compile/install?
Any help would be much appreciated,
Adam.
I have included the error I get below:
basedirlist is: ['/usr/local']
============================================================================
BUILDING MATPLOTLIB
matplotlib: 1.2.x
python: 3.2.2 (v3.2.2:137e45f15c0b, Sep 3 2011, 17:28:59)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]
platform: darwin
REQUIRED DEPENDENCIES
numpy: 1.6.2rc1
freetype2: found, but unknown version (no pkg-config)
OPTIONAL BACKEND DEPENDENCIES
libpng: found, but unknown version (no pkg-config)
Tkinter: Tkinter: version not identified, Tk: 8.5, Tcl: 8.5
Gtk+: no
* Building for Gtk+ requires pygtk; you must be able
* to "import gtk" in your build/install environment
Mac OS X native: yes
Qt: no
Qt4: Qt: 4.7.4, PyQt4: 4.8.6
PySide: no
Cairo: no
OPTIONAL DATE/TIMEZONE DEPENDENCIES
datetime: present, version unknown
dateutil: matplotlib will provide
pytz: matplotlib will provide
adding pytz
OPTIONAL USETEX DEPENDENCIES
dvipng: no
ghostscript: /bin/sh: gs: command not found
latex: no
[Edit setup.cfg to suppress the above messages]
============================================================================
pymods ['pylab']
packages ['matplotlib', 'matplotlib.backends', 'matplotlib.backends.qt4_editor', 'matplotlib.projections', 'matplotlib.testing', 'matplotlib.testing.jpl_units', 'matplotlib.tests', 'mpl_toolkits', 'mpl_toolkits.mplot3d', 'mpl_toolkits.axes_grid', 'mpl_toolkits.axes_grid1', 'mpl_toolkits.axisartist', 'matplotlib.sphinxext', 'matplotlib.tri', 'matplotlib.delaunay', 'pytz', 'dateutil', 'dateutil.zoneinfo']
running build
running build_py
copying lib/matplotlib/mpl-data/matplotlibrc -> build/lib.macosx-10.6-intel-3.2/matplotlib/mpl-data
copying lib/matplotlib/mpl-data/matplotlib.conf -> build/lib.macosx-10.6-intel-3.2/matplotlib/mpl-data
running build_ext
building 'matplotlib.ft2font' extension
gcc-4.2 -DNDEBUG -g -O3 -arch i386 -arch x86_64 -I/usr/local/include -I/usr/local/include/freetype2 -isysroot /Developer/SDKs/MacOSX10.6.sdk -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -DPYCXX_PYTHON_2TO3=1 -I/usr/local/include -I/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/numpy/core/include -I/usr/local/include -I. -I/usr/local/include/freetype2 -I/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/numpy/core/include/freetype2 -I/usr/local/include/freetype2 -I./freetype2 -I/Library/Frameworks/Python.framework/Versions/3.2/include/python3.2m -c src/ft2font.cpp -o build/temp.macosx-10.6-intel-3.2/src/ft2font.o
In file included from /Library/Frameworks/Python.framework/Versions/3.2/include/python3.2m/bytearrayobject.h:9,
from /Library/Frameworks/Python.framework/Versions/3.2/include/python3.2m/Python.h:73,
from ./CXX/WrapPython.h:58,
from ./CXX/Extensions.hxx:37,
from src/ft2font.h:6,
from src/ft2font.cpp:3:
/Developer/SDKs/MacOSX10.6.sdk/usr/include/stdarg.h:4:25: error: stdarg.h: No such file or directory
In file included from /Developer/SDKs/MacOSX10.6.sdk/usr/include/c++/4.2.1/iosfwd:45,
from /Developer/SDKs/MacOSX10.6.sdk/usr/include/c++/4.2.1/bits/stl_algobase.h:70,
from /Developer/SDKs/MacOSX10.6.sdk/usr/include/c++/4.2.1/bits/char_traits.h:46,
from /Developer/SDKs/MacOSX10.6.sdk/usr/include/c++/4.2.1/string:47,
from ./CXX/Python3/Exception.hxx:47,
from ./CXX/Python3/Objects.hxx:45,
from ./CXX/Python3/Extensions.hxx:52,
from ./CXX/Extensions.hxx:42,
from src/ft2font.h:6,
from src/ft2font.cpp:3:
/Developer/SDKs/MacOSX10.6.sdk/usr/include/c++/4.2.1/i686-apple-darwin11/bits/c++locale.h: In function ‘int std::__convert_from_v(int* const&, char*, int, const char*, ...)’:
/Developer/SDKs/MacOSX10.6.sdk/usr/include/c++/4.2.1/i686-apple-darwin11/bits/c++locale.h:77: error: ‘va_start’ was not declared in this scope
/Developer/SDKs/MacOSX10.6.sdk/usr/include/c++/4.2.1/i686-apple-darwin11/bits/c++locale.h:85: error: ‘va_end’ was not declared in this scope
In file included from /Library/Frameworks/Python.framework/Versions/3.2/include/python3.2m/bytearrayobject.h:9,
from /Library/Frameworks/Python.framework/Versions/3.2/include/python3.2m/Python.h:73,
from ./CXX/WrapPython.h:58,
from ./CXX/Extensions.hxx:37,
from src/ft2font.h:6,
from src/ft2font.cpp:3:
/Developer/SDKs/MacOSX10.6.sdk/usr/include/stdarg.h:4:25: error: stdarg.h: No such file or directory
In file included from /Developer/SDKs/MacOSX10.6.sdk/usr/include/c++/4.2.1/iosfwd:45,
from /Developer/SDKs/MacOSX10.6.sdk/usr/include/c++/4.2.1/bits/stl_algobase.h:70,
from /Developer/SDKs/MacOSX10.6.sdk/usr/include/c++/4.2.1/bits/char_traits.h:46,
from /Developer/SDKs/MacOSX10.6.sdk/usr/include/c++/4.2.1/string:47,
from ./CXX/Python3/Exception.hxx:47,
from ./CXX/Python3/Objects.hxx:45,
from ./CXX/Python3/Extensions.hxx:52,
from ./CXX/Extensions.hxx:42,
from src/ft2font.h:6,
from src/ft2font.cpp:3:
/Developer/SDKs/MacOSX10.6.sdk/usr/include/c++/4.2.1/i686-apple-darwin11/x86_64/bits/c++locale.h: In function ‘int std::__convert_from_v(int* const&, char*, int, const char*, ...)’:
/Developer/SDKs/MacOSX10.6.sdk/usr/include/c++/4.2.1/i686-apple-darwin11/x86_64/bits/c++locale.h:77: error: ‘va_start’ was not declared in this scope
/Developer/SDKs/MacOSX10.6.sdk/usr/include/c++/4.2.1/i686-apple-darwin11/x86_64/bits/c++locale.h:85: error: ‘va_end’ was not declared in this scope
lipo: can't figure out the architecture type of: /var/tmp//ccafJH1l.out
error: command 'gcc-4.2' failed with exit status 1
make: *** [mpl_build] Error 1
Okay...I think have managed to get matplotlib to install now...
First of all you need to install numpy. I have instructions to do this on another post: install numpy
Now open Terminal and clone the git repository for matplotlib (assumes you have git installed):
git clone git://github.com/matplotlib/matplotlib.git (this might take a while)
Once the clone is complete open your user folder in Finder
In your user folder open the matplotlib directory
There is a file called `make.osx' open this with TextEdit (or similar)
Change the following lines:
MACOSX_DEPLOYMENT_TARGET=10.6
OSX_SDK_VER=10.6
To:
MACOSX_DEPLOYMENT_TARGET=10.7
OSX_SDK_VER=10.7
Change the following lines:
${PYTHON} -c 'import urllib; urllib.urlretrieve("${ZLIBURL}", "${ZLIBFILE}")' &&\
${PYTHON} -c 'import urllib; urllib.urlretrieve("${PNGURL}", "${PNGFILE}")' &&\
${PYTHON} -c 'import urllib; urllib.urlretrieve("${FREETYPEURL}", "${FREETYPEFILE}")'
To:
${PYTHON} -c 'import urllib.request; urllib.request.urlretrieve("${ZLIBURL}", "${ZLIBFILE}")' &&\
${PYTHON} -c 'import urllib.request; urllib.request.urlretrieve("${PNGURL}", "${PNGFILE}")' &&\
${PYTHON} -c 'import urllib.request; urllib.request.urlretrieve("${FREETYPEURL}", "${FREETYPEFILE}")'
Save the changes
Open the file called setupext.py in idle
Find the line 'darwin' : [], and change it to 'darwin' : ['/usr/local'],
Save the file
Open Terminal again and type the following:
sudo make -f make.osx PREFIX=/usr/local PYVERSION=3.2 fetch deps mpl_build mpl_install
After some time matplotlib should be installed in the following directory:
/usr/local/lib/Python3.2/site-packages/
Open the above directory and also the following directory:
/Library/Python/3.2/site-packages/
Copy/move the following directories from /usr/local/lib/Python3.2/site-packages/ to /Library/Python/3.2/site-packages/:
dateutil
matplotlib
mpl_toolkits
matplotlib should be now installed
If you open idle and type import matplotlib it shouldn't return an error
I tried out the matplotlib/examples/user_interfaces/embedding_in_qt4_wtoolbar.py file and it seems works fine
Hope someone else finds this useful!
Thanks again for the assistance,
Adam.