This is the problem.
What does config.log
say?
This is the problem.
What does config.log
say?
hmm⦠where does pip put config.log?
I am running Xcode 9 though, so I wonder if the developer tools are too new(?)
Looks like my system only has LLVM + Clang⦠no gcc. Installing now
Okay, I installed gcc (via conda), but same error(s). Is it because Iām using conda?
I was able to replicate your problem, and here is my workaround.
Try downloading capnproto-c+±0.6.0 tarball separately.
cd capnproto-c++-0.6.0/
./configure
make
sudo make install
CFLAGS="-mmacosx-version-min=10.7 -std=c++11 -stdlib=libc++" pip install pycapnp --user
That seems to work for me.
I have to step away for a bit, but will try a little later.
Thanks for your help. Much appreciated.
Well, this fails during āmakeā:
dyld: lazy symbol binding failed: Symbol not found: __ZNKSt8__detail20_Prime_rehash_policy11_M_next_bktEm
Referenced from: /Users/jbmaxwell/capnproto-c++-0.6.0/.libs/libcapnpc-0.6.0.dylib (which was built for Mac OS X 10.12)
Expected in: /usr/lib/libstdc++.6.dylib
dyld: Symbol not found: __ZNKSt8__detail20_Prime_rehash_policy11_M_next_bktEm
Referenced from: /Users/jbmaxwell/capnproto-c++-0.6.0/.libs/libcapnpc-0.6.0.dylib (which was built for Mac OS X 10.12)
Expected in: /usr/lib/libstdc++.6.dylib
*** Received signal #6: Abort trap: 6
stack:
make: *** [test_capnpc_middleman] Error 1
Iām going to be building a Linux box for keras/tensorflow later, so maybe Iāll try again under Ubuntuā¦
This sounds like progress. Now you can point to the C++ build as the culprit instead of some nebulous python/pip issue.
Wow⦠okay, up and running on my keras/tensorflow Ubuntu box in about 20 mins!
Do you know if any specific routine is required (or available) to take advantage of cuda?
I have same problemsļ¼ when install pycapnp that nupic wantsļ¼
CFLAGS="-mmacosx-version-min=10.7 -std=c++11 -stdlib=libc++" pip install pycapnp==0.5.12
The install process fails.
the errors is ļ¼
Collecting pycapnp==0.5.12
Using cached pycapnp-0.5.12.tar.gz
Building wheels for collected packages: pycapnp
Running setup.py bdist_wheel for pycapnp ... error
Complete output from command /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -u -c "import setuptools, tokenize;__file__='/private/var/folders/9q/h7h59b3j2zq9qp2gf3tqc_2c0000gn/T/pip-build-izAFjD/pycapnp/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 /var/folders/9q/h7h59b3j2zq9qp2gf3tqc_2c0000gn/T/tmpO9UaWSpip-wheel- --python-tag cp27:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.6-intel-2.7
creating build/lib.macosx-10.6-intel-2.7/capnp
copying capnp/__init__.py -> build/lib.macosx-10.6-intel-2.7/capnp
copying capnp/_gen.py -> build/lib.macosx-10.6-intel-2.7/capnp
copying capnp/version.py -> build/lib.macosx-10.6-intel-2.7/capnp
copying capnp/__init__.pxd -> build/lib.macosx-10.6-intel-2.7/capnp
copying capnp/c++.capnp -> build/lib.macosx-10.6-intel-2.7/capnp
copying capnp/schema.capnp -> build/lib.macosx-10.6-intel-2.7/capnp
creating build/lib.macosx-10.6-intel-2.7/capnp/helpers
copying capnp/helpers/__init__.pxd -> build/lib.macosx-10.6-intel-2.7/capnp/helpers
copying capnp/helpers/helpers.pxd -> build/lib.macosx-10.6-intel-2.7/capnp/helpers
copying capnp/helpers/non_circular.pxd -> build/lib.macosx-10.6-intel-2.7/capnp/helpers
copying capnp/helpers/asyncHelper.h -> build/lib.macosx-10.6-intel-2.7/capnp/helpers
copying capnp/helpers/capabilityHelper.h -> build/lib.macosx-10.6-intel-2.7/capnp/helpers
copying capnp/helpers/checkCompiler.h -> build/lib.macosx-10.6-intel-2.7/capnp/helpers
copying capnp/helpers/fixMaybe.h -> build/lib.macosx-10.6-intel-2.7/capnp/helpers
copying capnp/helpers/rpcHelper.h -> build/lib.macosx-10.6-intel-2.7/capnp/helpers
copying capnp/helpers/serialize.h -> build/lib.macosx-10.6-intel-2.7/capnp/helpers
creating build/lib.macosx-10.6-intel-2.7/capnp/includes
copying capnp/includes/__init__.pxd -> build/lib.macosx-10.6-intel-2.7/capnp/includes
copying capnp/includes/capnp_cpp.pxd -> build/lib.macosx-10.6-intel-2.7/capnp/includes
copying capnp/includes/schema_cpp.pxd -> build/lib.macosx-10.6-intel-2.7/capnp/includes
copying capnp/includes/types.pxd -> build/lib.macosx-10.6-intel-2.7/capnp/includes
creating build/lib.macosx-10.6-intel-2.7/capnp/lib
copying capnp/lib/__init__.pxd -> build/lib.macosx-10.6-intel-2.7/capnp/lib
copying capnp/lib/capnp.pxd -> build/lib.macosx-10.6-intel-2.7/capnp/lib
copying capnp/lib/__init__.py -> build/lib.macosx-10.6-intel-2.7/capnp/lib
copying capnp/lib/pickle_helper.py -> build/lib.macosx-10.6-intel-2.7/capnp/lib
copying capnp/lib/capnp.pyx -> build/lib.macosx-10.6-intel-2.7/capnp/lib
creating build/lib.macosx-10.6-intel-2.7/capnp/templates
copying capnp/templates/module.pyx -> build/lib.macosx-10.6-intel-2.7/capnp/templates
copying capnp/templates/setup.py.tmpl -> build/lib.macosx-10.6-intel-2.7/capnp/templates
running build_ext
creating var
creating var/folders
creating var/folders/9q
creating var/folders/9q/h7h59b3j2zq9qp2gf3tqc_2c0000gn
creating var/folders/9q/h7h59b3j2zq9qp2gf3tqc_2c0000gn/T
creating var/folders/9q/h7h59b3j2zq9qp2gf3tqc_2c0000gn/T/tmpC37Bia
/usr/bin/clang -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -mmacosx-version-min=10.7 -std=c++11 -stdlib=libc++ -c /var/folders/9q/h7h59b3j2zq9qp2gf3tqc_2c0000gn/T/tmpC37Bia/vers.cpp -o var/folders/9q/h7h59b3j2zq9qp2gf3tqc_2c0000gn/T/tmpC37Bia/vers.o --std=c++11
/var/folders/9q/h7h59b3j2zq9qp2gf3tqc_2c0000gn/T/tmpC37Bia/vers.cpp:4:10: fatal error: 'capnp/common.h' file not found
#include "capnp/common.h"
^
1 error generated.
*WARNING* no libcapnp detected or rebuild forced. Will download and build it from source now. If you have C++ Cap'n Proto installed, it may be out of date or is not being detected. Downloading and building libcapnp may take a while.
fetching https://capnproto.org/capnproto-c++-0.5.3.1.tar.gz into /private/var/folders/9q/h7h59b3j2zq9qp2gf3tqc_2c0000gn/T/pip-build-izAFjD/pycapnp/bundled
configure: error: in `/private/var/folders/9q/h7h59b3j2zq9qp2gf3tqc_2c0000gn/T/pip-build-izAFjD/pycapnp/bundled/capnproto-c++':
configure: error: C compiler cannot create executables
See `config.log' for more details
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/9q/h7h59b3j2zq9qp2gf3tqc_2c0000gn/T/pip-build-izAFjD/pycapnp/setup.py", line 180, in <module>
'Topic :: Communications'],
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/wheel/bdist_wheel.py", line 179, in run
self.run_command('build')
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/build.py", line 127, in run
self.run_command(cmd_name)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/private/var/folders/9q/h7h59b3j2zq9qp2gf3tqc_2c0000gn/T/pip-build-izAFjD/pycapnp/setup.py", line 124, in run
build_libcapnp(bundle_dir, build_dir)
File "/private/var/folders/9q/h7h59b3j2zq9qp2gf3tqc_2c0000gn/T/pip-build-izAFjD/pycapnp/buildutils/build.py", line 21, in build_libcapnp
raise RuntimeError('Configure failed')
RuntimeError: Configure failed
----------------------------------------
Failed building wheel for pycapnp
Running setup.py clean for pycapnp
Failed to build pycapnp
Installing collected packages: pycapnp
Running setup.py install for pycapnp ... error
Complete output from command /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -u -c "import setuptools, tokenize;__file__='/private/var/folders/9q/h7h59b3j2zq9qp2gf3tqc_2c0000gn/T/pip-build-izAFjD/pycapnp/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/9q/h7h59b3j2zq9qp2gf3tqc_2c0000gn/T/pip-Hs_2T5-record/install-record.txt --single-version-externally-managed --compile:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/9q/h7h59b3j2zq9qp2gf3tqc_2c0000gn/T/pip-build-izAFjD/pycapnp/setup.py", line 92, in <module>
from Cython.Distutils import build_ext as build_ext_c
ImportError: No module named Cython.Distutils
----------------------------------------
Command "/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -u -c "import setuptools, tokenize;__file__='/private/var/folders/9q/h7h59b3j2zq9qp2gf3tqc_2c0000gn/T/pip-build-izAFjD/pycapnp/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/9q/h7h59b3j2zq9qp2gf3tqc_2c0000gn/T/pip-Hs_2T5-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/9q/h7h59b3j2zq9qp2gf3tqc_2c0000gn/T/pip-build-izAFjD/pycapnp/
my MacOS version is 10.11
gcc version show thatļ¼
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/c++/4.2.1 Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn) Target: x86_64-apple-darwin16.7.0
g++ version is ļ¼
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/c++/4.2.1 Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn) Target: x86_64-apple-darwin16.7.0 Thread model: posix
clang++ --version isļ¼
Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn) Target: x86_64-apple-darwin16.7.0 Thread model: posix
This looks like a permissions issue.
Iām having the exact came problems. Same setup as jacobeverist. I tried his approach using:
CFLAGS="-mmacosx-version-min=10.7 -std=c++11 -stdlib=libc++" pip install pycapnp
It gives a RuntimeError: Configure failed.
It still seems to be using ā/Python.framework/Versions/2.7/lib/python2.7/ā when it installs. If Iām understanding correctly I want it to be using the Mac installed python, not the Python 2.7 I installed from python.org, which it seems to be using. Itās weird because when I run āwhich pythonā command it is running ā/usr/bin/pythonā
Is there some way to force the install to use the Mac system python?
Thanks to @jacobeverist for this solution. I spent a full SEVEN HOURS trying to get Nupic installed on a Mac OS X 10.13 (High Sierra).
I had slight variations in the procedure, including pycapnp
version 0.6.3, and pip install pycapnp
without the compiler options. Also, my previous configuration was Anaconda Python 3.6, so it took many steps for me to install and configure Python 2.7 and virtualenv
to create an environment with 2.7 and packages just for Nupic. Then I installed all the requirements.txt EXCEPT nupic.bindings
. Finally I followed steps 1 thru 4, in this post.
To @rhyolight ā it would be really great if the Nupic Readme.md page could be updated with better instructions for Mac installation, reflecting these steps.
Where in the README do you think is the best place to put a note or something that links to this solution? Or maybe even better, what are the keywords that would would have brought you to this thread sooner?
I realise this is a reply to an old post but I just went through the process of installing nupic on my Mac (High Sierra) and here is worked for me. I use conda for environment management so thatās where I began. I was able install nupic and get the unit tests running without setting any additional flags.
# create a new environment and activate
conda create -n nupic python=2.7
conda activate nupic
# install 0.6.3 of pycapnp
conda install -c conda-forge pycapnp=0.6.3
# install nupic.core and nupic
pip install nupic.bindings
pip install nupic
# run tests
cd $HOME/code
git clone https://github.com/numenta/nupic.git
cd nupic
py.test tests/unit