Advertisement
PoHSuan

The correct way to build nupic.core

Jul 10th, 2016
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. # The PYTHONPATH must be point to the virtual environment in order to make cmake find the pycapnp in its python library ??
  2. # That's probably the cause of previous failures.
  3.  
  4. # Create path variable to the folder you git clone the nupic.core
  5. NUPIC_CORE=$PWD
  6.  
  7. # Build the directory
  8. mkdir build/script
  9. # enter the directory
  10. cd build/script
  11. # generate build file
  12. PYTHONPATH=$PYTHONPATH:/Users/pohsuanhuang/miniconda/envs/nupic/lib/python2.7/site-packages
  13. cmake $NUPIC_CORE -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../release -DPY_EXTENSIONS_DIR=$NUPIC_CORE/bindings/py/nupic/bindings -DCMAKE_CXX_COMPILER=/usr/bin/clang++
  14.  
  15. # While still in ./script
  16. PYTHONPATH=$PYTHONPATH:/Users/pohsuanhuang/miniconda/envs/nupic/lib/python2.7/site-packages CXX='/usr/bin/clang++' make -j3
  17.  
  18. # While still in ./script
  19. CXX='/usr/bin/clang++' make install
  20.  
  21. # Run the tests
  22. cd $NUPIC_CORE/build/release/bin
  23. ./cpp_region_test
  24. ./unit_tests
  25.  
  26.  
  27. # Install nupic.bindings Python library. 'ARCHFLAGS="-arch x86_64' is ONLY for OS X
  28.  
  29. cd $NUPIC_CORE
  30. export ARCHFLAGS="-arch x86_64
  31. python setup.py develop
  32.  
  33. # then the following should work smoothly.
  34. # run the tests...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement