Can't install htm.core

Hi!

I reinstalled my Linux Mint. And I want to reinstall htm.core. I didn’t install my nupic. I look this instruction https://github.com/htm-community/htm.core. And then I wrote python3.8 setup.py install. I didn’t use --uesr, because I use virtualenv. And I got next errors:

[ 79%] Linking CXX executable unit_tests
[ 79%] Built target unit_tests
Makefile:170: recipe for target 'all' failed
make: *** [all] Error 2
Traceback (most recent call last):
  File "setup.py", line 374, in <module>
    getExtensionFiles(platform, build_type)
  File "setup.py", line 239, in getExtensionFiles
    generateExtensions(platform, build_type)
  File "setup.py", line 286, in generateExtensions
    subprocess.check_call(["cmake", "--build", ".", "--target", "install", "--config", build_type, "--", "-j", "4"]) 
  File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--target', 'install', '--config', 'Release', '--', '-j', '4']' returned non-zero exit status 2.

Can you help me? @breznak @David_Keeney

Thanx a lot for your help.

1 Like

This is a rather generic error message. But it does tell us that CMake is installed, you are using python3.8 and the error is someplace in the make.

I don’t have Mint but I will try this on Ubuntu and see if I can reproduce it.
What we need is to use make VERBOSE=1 (without the -j4) in an attempt to get a more detailed error message or context.

1 Like

I try to write this code:
python3.8 setup.py install VERBOSE=1
And get same error.

[ 79%] Built target unit_tests
Makefile:170: recipe for target 'all' failed
make: *** [all] Error 2
Traceback (most recent call last):
  File "setup.py", line 374, in <module>
    getExtensionFiles(platform, build_type)
  File "setup.py", line 239, in getExtensionFiles
    generateExtensions(platform, build_type)
  File "setup.py", line 286, in generateExtensions
    subprocess.check_call(["cmake", "--build", ".", "--target", "install", "--config", build_type, "--", "-j", "4"]) 
  File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--target', 'install', '--config', 'Release', '--', '-j', '4']' returned non-zero exit status 2.

@David_Keeney I got the same error while trying to build HTM.core today from pip. I’ve posted a bug report on GitHub. @Sergey Feel free to comment here or on GitHub if you want to provided details about issues on your side. I hope my bug report covers your issue.

Thanks for posting an issue. I will followup there.

The install from pip only knows about Python 3.7 on a few specific platforms. Best to do a full build.

I think the issue may be that requirements.txt is not being ran successfully in setup.py during a full build from sources. Try:
sudo pip3 install -r requirements.txt
Then try the build again.