Help Building nupic.core (Yosemite)


I can’t get this to go all the way through… I re-cloned nupic.core and I got 66% of the way through this time while running the command make -j8

That’s where I’m at… How do I get past this?

Here’s the last 10 or so lines of my build output:

Building CXX object src/CMakeFiles/nupic_core_solo.dir/nupic/os/FStream.cpp.o
[ 59%] Building CXX object src/CMakeFiles/nupic_core_solo.dir/nupic/os/OSUnix.cpp.o
[ 59%] Building CXX object src/CMakeFiles/nupic_core_solo.dir/nupic/os/OSWin.cpp.o
[ 59%] Building CXX object src/CMakeFiles/nupic_core_solo.dir/nupic/os/Path.cpp.o
[ 60%] Building CXX object src/CMakeFiles/nupic_core_solo.dir/nupic/os/Regex.cpp.o
[ 60%] Building CXX object src/CMakeFiles/nupic_core_solo.dir/nupic/os/Timer.cpp.o
[ 61%] Building CXX object src/CMakeFiles/nupic_core_solo.dir/nupic/regions/PyRegion.cpp.o
[ 61%] Building CXX object src/CMakeFiles/nupic_core_solo.dir/nupic/regions/VectorFile.cpp.o
[ 62%] Building CXX object src/CMakeFiles/nupic_core_solo.dir/nupic/regions/VectorFileEffector.cpp.o
[ 62%] Building CXX object src/CMakeFiles/nupic_core_solo.dir/nupic/regions/VectorFileSensor.cpp.o
[ 62%] Building CXX object src/CMakeFiles/nupic_core_solo.dir/nupic/types/BasicType.cpp.o
[ 63%] Building CXX object src/CMakeFiles/nupic_core_solo.dir/nupic/types/Fraction.cpp.o
[ 63%] Building CXX object src/CMakeFiles/nupic_core_solo.dir/nupic/utils/LoggingException.cpp.o
[ 64%] Building CXX object src/CMakeFiles/nupic_core_solo.dir/nupic/utils/LogItem.cpp.o
[ 64%] Building CXX object src/CMakeFiles/nupic_core_solo.dir/nupic/utils/MovingAverage.cpp.o
[ 64%] Building CXX object src/CMakeFiles/nupic_core_solo.dir/nupic/utils/Random.cpp.o
[ 65%] Building CXX object src/CMakeFiles/nupic_core_solo.dir/nupic/utils/StringUtils.cpp.o
[ 65%] Building CXX object src/CMakeFiles/nupic_core_solo.dir/nupic/utils/TRandom.cpp.o
[ 66%] Building CXX object src/CMakeFiles/nupic_core_solo.dir/nupic/utils/Watcher.cpp.o
Linking CXX static library libnupic_core_solo.a
/Applications/ file: libnupic_core_solo.a(Collection.cpp.o) has no symbols
/Applications/ file: libnupic_core_solo.a(OSWin.cpp.o) has no symbols
/Applications/ file: libnupic_core_solo.a(Collection.cpp.o) has no symbols
/Applications/ file: libnupic_core_solo.a(OSWin.cpp.o) has no symbols
[ 66%] Built target nupic_core_solo
make: *** [all] Error 2

Have you tried installing with pip?

First, make sure no old versions are installed by running this a few times:

pip uninstall nupic.bindings -y
pip uninstall nupic -y

If you’ve installed in the past with sudo, you should run the above commands with sudo. If you installed in the past with the --user flag, you should run the above commands with the --user flag. (If you’re not sure, it is safe to run all permutations of the commands above just to make sure.

Now that no NuPIC artifacts are left on your system, simply run:

pip install nupic --user

What happens?

I ran and re-ran the pip uninstall and got this error on both uninstall and install:


Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/pip/", line 215, in main
    status =, args)
  File "/Library/Python/2.7/site-packages/pip/commands/", line 299, in run
  File "/Library/Python/2.7/site-packages/pip/req/", line 370, in prepare_files
  File "/Library/Python/2.7/site-packages/pip/req/", line 458, in _prepare_file
    req_to_install, finder)
  File "/Library/Python/2.7/site-packages/pip/req/", line 397, in _check_skip_installed
  File "/Library/Python/2.7/site-packages/pip/req/", line 1004, in check_if_exists
  File "/Library/Python/2.7/site-packages/pip/_vendor/pkg_resources/", line 535, in get_distribution
    dist = get_provider(dist)
  File "/Library/Python/2.7/site-packages/pip/_vendor/pkg_resources/", line 415, in get_provider
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
  File "/Library/Python/2.7/site-packages/pip/_vendor/pkg_resources/", line 943, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/Library/Python/2.7/site-packages/pip/_vendor/pkg_resources/", line 834, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
ContextualVersionConflict: (pytest 2.5.1 (/Users/cogmission/Library/Python/2.7/lib/python/site-packages), Requirement.parse('pytest==2.4.2'), set(['nupic']))


EDIT: First it did uninstall though

I don’t even have nupic.core installed though… Does that matter? That’s what I was trying to do when I got the original error?

I don’t think your python environment is in good shape. What does this print out?

> python --version

> which python

> pip --version

> which pip

Did you install python via homebrew? Or are you using the system python (default)? Also, do you have XCode installed?

Python 2.7.10


pip 8.1.2 from /Library/Python/2.7/site-packages (python 2.7)


Ok, and the stack trace you posted above resulted from which exact command?

make -j3 (for building core) (only I used make -j8 cause that’s the way I roll…)

EDIT: I could have done make -j10 but that would have just been showing off… :stuck_out_tongue_winking_eye:

No, not that stack track, the 2nd one you pasted.

Either way, try uninstalling pytest by running pip uninstall pytest. Again, same thing about sudo and the --user flag (when installing python packages via pip, I almost always use the --user flag to install to a local location).

After the first un install succeeded, I still ran all the permutations of --user and sudo you suggested and I got that on all the uninstalls after the first succeeded…

i.e. pip install nupic --user

pip uninstall pytest --user

pip uninstall [options] …
pip uninstall [options] -r …

no such option: --user

Where the hell do you put the flag?

Oh sorry, you don’t need the --user flag when uninstalling, apparently. But you might need to sudo pip uninstall pytest because it is a command line tool as well as a library.

Ok pytest uninstalled

When you think you have pytest uninstalled, you can test it by running:

> python
Python 2.7.10 (default, Oct 23 2015, 19:19:21)
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pytest

This should raise an exception, and that proves it is no longer installed. Then try running pip install nupic --user again.

Ok it’s running this time :slight_smile:

Successfully installed nupic-0.5.4 nupic.bindings-0.4.4 pytest-2.5.1

I can’t stop there though. I need the development setup… Just making sure you know…?

Running pip install nupic will automatically install nupic.bindings from Pypi if there is a binary installation file available for your platform (there is one for Yosemite).

Oh dang. No, I did not know that. I thought you just needed to run NuPIC for comparison, but you’ll actually be changing code then? But not C++ code, right?

Right - I’ll only be editing Nupic’s Python code (potentially) … At least for now :wink: