Error installing htm-core

hi every one. I am using Manjaro Linux and Python 3.9 on it. When I use this command for installation " python setup.py install --user --force" or “” python setup.py install " or “python setup.py install --user”
(Both in the virtual environment and in the main Python) I encounter this error.

– Configuring incomplete, errors occurred!
See also “/home/shiva/code/htm (1).core-master/build/scripts/CMakeFiles/CMakeOutput.log”.
Traceback (most recent call last):
File “/home/shiva/code/htm (1).core-master/setup.py”, line 374, in
getExtensionFiles(platform, build_type)
File “/home/shiva/code/htm (1).core-master/setup.py”, line 239, in getExtensionFiles
generateExtensions(platform, build_type)
File “/home/shiva/code/htm (1).core-master/setup.py”, line 282, in generateExtensions
configure(platform, build_type)
File “/home/shiva/code/htm (1).core-master/setup.py”, line 341, in configure
subprocess.check_call([“cmake”,BUILD_TYPE , PY_VER, REPO_DIR])
File “/usr/lib/python3.9/subprocess.py”, line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[‘cmake’, ‘-/home/shiva/Pictures/htmcore.png_BUILD_TYPE=Release’, ‘-DBINDING_BUILD=Python3’, ‘/home/shiva/code/htm (1).core-master’]’ returned non-zero exit status 1.

please help me

Hi Shiva,

I created an issue for this on the github forum:

thank you :pray:

Hey Shiva,

I was running into some similar errors when I was installing stuff too. As an alternative you could consider installing Docker on your machine and running it that way. I found it much easier to install a Docker Jupyter-Notebook container and then just install htm.core on top of that.

To go down this road, install Docker on your machine. Then run:

  1. docker run -p 8888:8888 --user root -v [location_you_want_to_keep_your_files_in]:/home jupyter/datascience-notebook
    Remember to just replace [location_you_want_to_keep_your_files_in] with the absolute path where you are keeping your files. The -v command above just tells Docker that the container will be able to see and save files to some folder on your local machine that you specify. Wherever that is, go there and run pwd and include that in the above docker run command
  2. Docker will download the jupyter notebook container and run it. You will see the logs on the screen
  3. Open a new shell on your local machine and go into the docker container’s bash shell by running: docker exec -it [docker container ID] bash
    Note you can get the ID of the Docker Container from running: docker container ls
  4. You will then be in the Docker container shell as root. From here, just run: apt-get update and apt-get install cmake
  5. Then run: git clone https://github.com/htm-community/htm to bring down the htm.core repo into the docker container. You will notice it downloads to the \home folder in the Docker container which has been synced with your local folder you created with that -v command, so it the cloned repo will appear in your local machine folder as well
  6. Once its downloaded, just follow the instructions at https://github.com/htm-community/htm.core to install the Python release. Basically, its just cd’ing into the relevant folder and running python setup.py install --user --force
  7. You can also compile the C++ code by following the instructions and the docs.

You should end up with everything installed, and when you go to localhost:8888 that Docker has spun up for you, you can check by things are ok by copying code from https://github.com/htm-community/htm.core/blob/master/py/htm/examples/hotgym.py into a notebook.

Not sure if this is the best way but it worked well for me. It seemed like a nice option if you want to explore both the C++ and Python code and have lots of other data science tools/libraries handy in the Docker container

Good luck!

1 Like

Hi! I am not sure, but it may help. Try to use a clean virtual environment. Ensure that conda does not pollute the environment; comment according section in .bashrc before activating venv and installing htm.core.

Thanks for your guidance.I wish there was an easier way to run. I am a beginner and I am not very familiar with these explanations

hi dear whosuka
I did these things,But when I use the following commands “python -m pip install -i Simple index htm.core”,for installation I get this error
ERROR: Could not find a version that satisfies the requirement htm.core
ERROR: No matching distribution found for htm.core

“pip install -i Simple index htm.core[examples]”
ERROR: Could not find a version that satisfies the requirement htm.core
ERROR: No matching distribution found for htm.core

and when I type this command
“python setup.py install --user --force”
i see this error
– Configuring incomplete, errors occurred!
See also “/home/shiva/code/htm (1).core-master/build/scripts/CMakeFiles/CMakeOutput.log”.
Traceback (most recent call last):
File “/home/shiva/code/htm (1).core-master/setup.py”, line 374, in
getExtensionFiles(platform, build_type)
File “/home/shiva/code/htm (1).core-master/setup.py”, line 239, in getExtensionFiles
generateExtensions(platform, build_type)
File “/home/shiva/code/htm (1).core-master/setup.py”, line 282, in generateExtensions
configure(platform, build_type)
File “/home/shiva/code/htm (1).core-master/setup.py”, line 341, in configure
subprocess.check_call([“cmake”,BUILD_TYPE , PY_VER, REPO_DIR])
File “/usr/lib/python3.9/subprocess.py”, line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[‘cmake’, ‘-/home/shiva/Pictures/htmcore.png_BUILD_TYPE=Release’, ‘-DBINDING_BUILD=Python3’, ‘/home/shiva/code/htm (1).core-master’]’ returned non-zero exit status 1.

Before the Linux update and when the Python version was 3.8, this code ran without any problems, but not now.

Yeah I know - I first tried to just install with standard anaconda installation but ran into some issues similiar to what you are having. The docker option should just let you cut and paste the above commands so hopefully helps…in any case, its worth the work to set it up, its really nice to use once you get it set up

That is, once setup is installed in Docker, there is no need to install it the next time?
Does the code run on my system after that or does it always need the Internet (like colab, etc.)?