I noticed that I can’t upgrade from pip because it depends on a new version of nupic.bindings and the pip package looks for the update version on the links page, but can’t find any:
No luck. Clean distro can’t install with my setup.
ADN448:~ jse26711$ pip list
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
pip (9.0.1)
setuptools (28.8.0)
ADN448:~ jse26711$ sudo pip install numpy
The directory ‘/Users/jse26711/Library/Caches/pip/http’ or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.
The directory ‘/Users/jse26711/Library/Caches/pip’ or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.
Collecting numpy
Downloading numpy-1.13.0-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (4.6MB)
100% |████████████████████████████████| 4.6MB 210kB/s
Installing collected packages: numpy
Successfully installed numpy-1.13.0
ADN448:~ jse26711$ sudo pip install nupic
The directory ‘/Users/jse26711/Library/Caches/pip/http’ or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.
The directory ‘/Users/jse26711/Library/Caches/pip’ or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.
Collecting nupic
Downloading nupic-0.8.0-py2-none-any.whl (4.8MB)
100% |████████████████████████████████| 4.8MB 194kB/s
Collecting PyYAML==3.10 (from nupic)
Collecting coverage==3.7.1 (from nupic)
Collecting psutil==1.0.1 (from nupic)
Collecting DBUtils==1.1 (from nupic)
Collecting numpy==1.12.1 (from nupic)
Downloading numpy-1.12.1-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (4.4MB)
100% |████████████████████████████████| 4.4MB 185kB/s
Collecting validictory==0.9.1 (from nupic)
Collecting pytest-xdist==1.16.0 (from nupic)
Downloading pytest-xdist-1.16.0.tar.gz (88kB)
100% |████████████████████████████████| 92kB 2.9MB/s
Collecting asteval==0.9.1 (from nupic)
Collecting python-dateutil==2.1 (from nupic)
Collecting prettytable==0.7.2 (from nupic)
Collecting pytest==3.0.7 (from nupic)
Downloading pytest-3.0.7-py2.py3-none-any.whl (172kB)
100% |████████████████████████████████| 174kB 2.3MB/s
Collecting unittest2==0.5.1 (from nupic)
Collecting nupic.bindings==0.7.0 (from nupic)
Could not find a version that satisfies the requirement nupic.bindings==0.7.0 (from nupic) (from versions: 0.1.3, 0.1.5, 0.2, 0.2.1, 0.2.2, 0.2.3, 0.2.4, 0.2.5, 0.2.7, 0.3.0, 0.3.1, 0.4.0, 0.4.1, 0.4.2, 0.4.3, 0.4.4, 0.4.5, 0.4.6, 0.4.7, 0.4.8, 0.4.9, 0.4.10.dev0, 0.4.10, 0.4.12, 0.4.13, 0.4.14, 0.4.15, 0.4.16, 0.5.0, 0.5.1, 0.5.3, 0.6.0, 0.6.1)
No matching distribution found for nupic.bindings==0.7.0 (from nupic)
ADN448:~ jse26711$
Regarding sudo, --user, etc. You can install packages however you like as long as you are consistent and it works. So if you have been using sudo for everything then I’d stick with that. Although it isn’t the recommended option.
Directly installing nupic.bindings using the above command will install 0.6.1 which the latest working version that I can use. It does not recognize the future versions.
If I try to subsequently install nupic with the same command-line, it fails to find the dependent nupic.bindings which is a future version 0.7.0
I upgraded to 10.11 and I am no longer getting the previous error message. It successfully found the package. Now it is having a hard time compiling pycapnp. I’m not sure how to resolve this:
ADN448:~ jse26711$ pip install nupic.bindings --user --no-cache
Collecting nupic.bindings
Downloading nupic.bindings-0.7.2-cp27-cp27m-macosx_10_11_intel.whl (3.0MB)
100% |████████████████████████████████| 3.0MB 15.4MB/s
Requirement already satisfied: pytest-cov==2.5.0 in ./Library/Python/2.7/lib/python/site-packages (from nupic.bindings)
Requirement already satisfied: numpy==1.12.1 in ./Library/Python/2.7/lib/python/site-packages (from nupic.bindings)
Collecting pycapnp==0.5.12 (from nupic.bindings)
Downloading pycapnp-0.5.12.tar.gz (454kB)
100% |████████████████████████████████| 460kB 12.6MB/s
Requirement already satisfied: pytest==3.0.7 in ./Library/Python/2.7/lib/python/site-packages (from nupic.bindings)
Requirement already satisfied: pytest-xdist==1.16.0 in ./Library/Python/2.7/lib/python/site-packages (from nupic.bindings)
Requirement already satisfied: coverage>=3.7.1 in ./Library/Python/2.7/lib/python/site-packages (from pytest-cov==2.5.0->nupic.bindings)
Requirement already satisfied: py>=1.4.29 in ./Library/Python/2.7/lib/python/site-packages (from pytest==3.0.7->nupic.bindings)
Requirement already satisfied: setuptools in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from pytest==3.0.7->nupic.bindings)
Requirement already satisfied: execnet>=1.1 in ./Library/Python/2.7/lib/python/site-packages (from pytest-xdist==1.16.0->nupic.bindings)
Requirement already satisfied: apipkg>=1.4 in ./Library/Python/2.7/lib/python/site-packages (from execnet>=1.1->pytest-xdist==1.16.0->nupic.bindings)
Installing collected packages: pycapnp, nupic.bindings
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/qz/x5q748fj2xb8f6ps_lpt1flh000t2q/T/pip-build-RZyiMH/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/qz/x5q748fj2xb8f6ps_lpt1flh000t2q/T/pip-5GukUU-record/install-record.txt --single-version-externally-managed --compile --user --prefix=:
running install
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/qz
creating var/folders/qz/x5q748fj2xb8f6ps_lpt1flh000t2q
creating var/folders/qz/x5q748fj2xb8f6ps_lpt1flh000t2q/T
creating var/folders/qz/x5q748fj2xb8f6ps_lpt1flh000t2q/T/tmpIIgC9o
/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -g -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -c /var/folders/qz/x5q748fj2xb8f6ps_lpt1flh000t2q/T/tmpIIgC9o/vers.cpp -o var/folders/qz/x5q748fj2xb8f6ps_lpt1flh000t2q/T/tmpIIgC9o/vers.o --std=c++11
/var/folders/qz/x5q748fj2xb8f6ps_lpt1flh000t2q/T/tmpIIgC9o/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/qz/x5q748fj2xb8f6ps_lpt1flh000t2q/T/pip-build-RZyiMH/pycapnp/bundled
In file included from src/capnp/arena.c++:23:
src/capnp/arena.h:229:34: warning: 'extractCap' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
kj::Maybe<kj::Own<ClientHook>> extractCap(uint index);
^
src/capnp/arena.h:205:42: note: overridden virtual function is here
virtual kj::Maybe<kj::Own<ClientHook>> extractCap(uint index) = 0;
^
src/capnp/arena.h:313:34: warning: 'extractCap' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
kj::Maybe<kj::Own<ClientHook>> extractCap(uint index);
^
src/capnp/arena.h:205:42: note: overridden virtual function is here
virtual kj::Maybe<kj::Own<ClientHook>> extractCap(uint index) = 0;
^
In file included from src/capnp/layout.c++:25:
src/capnp/arena.h:229:34: warning: 'extractCap' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
kj::Maybe<kj::Own<ClientHook>> extractCap(uint index);
^
src/capnp/arena.h:205:42: note: overridden virtual function is here
virtual kj::Maybe<kj::Own<ClientHook>> extractCap(uint index) = 0;
^
src/capnp/arena.h:313:34: warning: 'extractCap' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
kj::Maybe<kj::Own<ClientHook>> extractCap(uint index);
^
src/capnp/arena.h:205:42: note: overridden virtual function is here
virtual kj::Maybe<kj::Own<ClientHook>> extractCap(uint index) = 0;
^
2 warnings generated.
In file included from src/capnp/message.c++:25:
src/capnp/arena.h:229:34: warning: 'extractCap' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
kj::Maybe<kj::Own<ClientHook>> extractCap(uint index);
^
src/capnp/arena.h:205:42: note: overridden virtual function is here
virtual kj::Maybe<kj::Own<ClientHook>> extractCap(uint index) = 0;
^
src/capnp/arena.h:313:34: warning: 'extractCap' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
kj::Maybe<kj::Own<ClientHook>> extractCap(uint index);
^
src/capnp/arena.h:205:42: note: overridden virtual function is here
virtual kj::Maybe<kj::Own<ClientHook>> extractCap(uint index) = 0;
^
2 warnings generated.
2 warnings generated.
In file included from src/capnp/schema-loader.c++:28:
src/capnp/arena.h:229:34: warning: 'extractCap' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
kj::Maybe<kj::Own<ClientHook>> extractCap(uint index);
^
src/capnp/arena.h:205:42: note: overridden virtual function is here
virtual kj::Maybe<kj::Own<ClientHook>> extractCap(uint index) = 0;
^
src/capnp/arena.h:313:34: warning: 'extractCap' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
kj::Maybe<kj::Own<ClientHook>> extractCap(uint index);
^
src/capnp/arena.h:205:42: note: overridden virtual function is here
virtual kj::Maybe<kj::Own<ClientHook>> extractCap(uint index) = 0;
^
2 warnings generated.
sed: illegal option -- r
usage: sed script [-Ealn] [-i extension] [file ...]
sed [-Ealn] [-i extension] [-e script] ... [-f script_file] ... [file ...]
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: .libs/libkj.a(units.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: .libs/libkj.a(units.o) has no symbols
sed: illegal option -- r
usage: sed script [-Ealn] [-i extension] [file ...]
sed [-Ealn] [-i extension] [-e script] ... [-f script_file] ... [file ...]
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: .libs/libcapnp.a(list.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: .libs/libcapnp.a(list.o) has no symbols
sed: illegal option -- r
usage: sed script [-Ealn] [-i extension] [file ...]
sed [-Ealn] [-i extension] [-e script] ... [-f script_file] ... [file ...]
In file included from src/capnp/capability.c++:26:
src/capnp/arena.h:229:34: warning: 'extractCap' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
kj::Maybe<kj::Own<ClientHook>> extractCap(uint index);
^
src/capnp/arena.h:205:42: note: overridden virtual function is here
virtual kj::Maybe<kj::Own<ClientHook>> extractCap(uint index) = 0;
^
src/capnp/arena.h:313:34: warning: 'extractCap' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
kj::Maybe<kj::Own<ClientHook>> extractCap(uint index);
^
src/capnp/arena.h:205:42: note: overridden virtual function is here
virtual kj::Maybe<kj::Own<ClientHook>> extractCap(uint index) = 0;
^
src/capnp/capability.c++:566:15: warning: 'getBrand' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
const void* getBrand() {
^
src/capnp/capability.h:348:23: note: overridden virtual function is here
virtual const void* getBrand() = 0;
^
src/capnp/capability.c++:590:26: warning: 'getResolved' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
kj::Maybe<ClientHook&> getResolved() {
^
src/capnp/capability.h:402:34: note: overridden virtual function is here
virtual kj::Maybe<ClientHook&> getResolved() = 0;
^
4 warnings generated.
sed: illegal option -- r
usage: sed script [-Ealn] [-i extension] [file ...]
sed [-Ealn] [-i extension] [-e script] ... [-f script_file] ... [file ...]
sed: illegal option -- r
usage: sed script [-Ealn] [-i extension] [file ...]
sed [-Ealn] [-i extension] [-e script] ... [-f script_file] ... [file ...]
mkdir: /private/var/folders/qz/x5q748fj2xb8f6ps_lpt1flh000t2q/T/pip-build-RZyiMH/pycapnp/build/include: File exists
mkdir: /private/var/folders/qz/x5q748fj2xb8f6ps_lpt1flh000t2q/T/pip-build-RZyiMH/pycapnp/build/include/capnp: File exists
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: /private/var/folders/qz/x5q748fj2xb8f6ps_lpt1flh000t2q/T/pip-build-RZyiMH/pycapnp/build/lib/libkj.a(units.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: /private/var/folders/qz/x5q748fj2xb8f6ps_lpt1flh000t2q/T/pip-build-RZyiMH/pycapnp/build/lib/libcapnp.a(list.o) has no symbols
building 'capnp.lib.capnp' extension
creating build/temp.macosx-10.6-intel-2.7
creating build/temp.macosx-10.6-intel-2.7/capnp
creating build/temp.macosx-10.6-intel-2.7/capnp/lib
/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -g -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I/private/var/folders/qz/x5q748fj2xb8f6ps_lpt1flh000t2q/T/pip-build-RZyiMH/pycapnp/build/include -c capnp/lib/capnp.cpp -o build/temp.macosx-10.6-intel-2.7/capnp/lib/capnp.o --std=c++11
In file included from capnp/lib/capnp.cpp:283:
./capnp/helpers/checkCompiler.h:4:8: warning: "Your compiler supports C++11 but your C++ standard library does not. If your system has libc++ installed (as should be the case on e.g. Mac OSX), try adding -stdlib=libc++ to your CFLAGS (ignore the other warning that says to use CXXFLAGS)." [-W#warnings]
#warning "Your compiler supports C++11 but your C++ standard library does not. If your system has libc++ installed (as should be the case on e.g. Mac OSX), try adding -stdlib=libc++ to your CFLAGS (ignore the other warning that says to use CXXFLAGS)."
^
In file included from capnp/lib/capnp.cpp:283:
In file included from ./capnp/helpers/checkCompiler.h:9:
In file included from /private/var/folders/qz/x5q748fj2xb8f6ps_lpt1flh000t2q/T/pip-build-RZyiMH/pycapnp/build/include/capnp/dynamic.h:40:
In file included from /private/var/folders/qz/x5q748fj2xb8f6ps_lpt1flh000t2q/T/pip-build-RZyiMH/pycapnp/build/include/capnp/schema.h:33:
In file included from /private/var/folders/qz/x5q748fj2xb8f6ps_lpt1flh000t2q/T/pip-build-RZyiMH/pycapnp/build/include/capnp/schema.capnp.h:7:
In file included from /private/var/folders/qz/x5q748fj2xb8f6ps_lpt1flh000t2q/T/pip-build-RZyiMH/pycapnp/build/include/capnp/generated-header-support.h:31:
In file included from /private/var/folders/qz/x5q748fj2xb8f6ps_lpt1flh000t2q/T/pip-build-RZyiMH/pycapnp/build/include/capnp/layout.h:36:
/private/var/folders/qz/x5q748fj2xb8f6ps_lpt1flh000t2q/T/pip-build-RZyiMH/pycapnp/build/include/kj/common.h:54:8: warning: "Your compiler supports C++11 but your C++ standard library does not. If your " "system has libc++ installed (as should be the case on e.g. Mac OSX), try adding " "-stdlib=libc++ to your CXXFLAGS." [-W#warnings]
#warning "Your compiler supports C++11 but your C++ standard library does not. If your "\
^
/private/var/folders/qz/x5q748fj2xb8f6ps_lpt1flh000t2q/T/pip-build-RZyiMH/pycapnp/build/include/kj/common.h:78:10: fatal error: 'initializer_list' file not found
#include <initializer_list>
^
2 warnings and 1 error generated.
error: command '/usr/bin/clang' failed with exit status 1
----------------------------------------
Command "/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -u -c "import setuptools, tokenize;__file__='/private/var/folders/qz/x5q748fj2xb8f6ps_lpt1flh000t2q/T/pip-build-RZyiMH/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/qz/x5q748fj2xb8f6ps_lpt1flh000t2q/T/pip-5GukUU-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /private/var/folders/qz/x5q748fj2xb8f6ps_lpt1flh000t2q/T/pip-build-RZyiMH/pycapnp/
ADN448:~ jse26711$
No, it should get installed with nupic.core, and it exists so we can serialize objects in C++ and Python interchangeably. I know there is a way to install without the capnp dependency. You might search the nupic.core github issues for reports on capnp. Or search these forums (if you haven’t already).
So I’ve been plodding along with trying to get pycapnp installed on my MacOSX. I’ve run into one issue after another, but I am steadily making progress. Now I am blocked by a typecasting error in the compilation.
You know, I didn’t think this should be this hard. Why all these complications for a simple dependency? Anyway, I’m not getting any help from the pycapnp site, maybe some help here?
Sorry you have having problems with pycapnp. I believe there may be a way to install without this dependency (we do this on our windows builds). I think perhaps @vkruglikov knows something about this?