Closed ctrl-z-9000-times closed 3 years ago
I tried to reproduce the error and could not. I am trying with ubuntu 20.04 and Python 3.7. There could be some differences there between what I am using and your setup. However, the error occurred trying to download the Eigen package from its repository on the web. This is code in CMake and is unlikely to be affected by OS or Python version. It is my guess that the Eigen server was down or temporarily not accessible at the time you tried to do the build. The solution is to take a break and try again later. It is unlikely that this problem will occur very often.
If this problem continues for more than a day, PLEASE post here to let me know so I can dive deeper into the problem.
Remember, always delete the generated 'build' folder before trying again if the build should fail for any reason. The build caches a lot of things in that folder (including the prerequisites) and it is probably in an unknown state if the build fails.
To avoid this problem in the future or if someone wants to build in an environment without access to the web, you can pre-download the prerequisite packages and place them in a folder where the build can find them. Follow the instructions in the README under the heading of "Dependency Management".
I hope that helps.
hi dear dkeeney
Thanks for your guidance.I have been installing the htm.core for about ten days. 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 alsdkeeneyo “/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/codehi dear whosuka I did thedkeeneyse 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 whedkeeneyn 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 “/homdkeeneye/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./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.
Please guide me
Thank you for asking... The command: “python -m pip install -i Simple index htm.core” will search PyPi for a pre-compiled binary release that matches your operating system version and Python version. Currently we only uploaded precompiled versions for Ubuntu Linux 18 with standard Python 3.8 into the PyPi repository. For anything else you will need to build from sources.
The command: “python setup.py install --user --force” will build from sources. This should work for almost everyone. When it completes the htm.core modules are installed and you can begin using them. You may not need the --user or --force options depending on how you setup your Python.
However, you are getting an error with the source build. So, we need to resolve that first.
I assume that before you ran the source build you completely removed the 'build' directory.
cd /home/shiva/code/htm (1).core-master
sudo rm -r build
python setup.py install --user --force
If you did and you still get this error, please send me the file “/home/shiva/code/htm (1).core-master/build/scripts/CMakeFiles/CMakeOutput.log” I am hoping that it will give me a clue as to what is going on.
Thanks
thank you very much for your help.Unfortunately,I get that Error again.I will send the file “/home/shiva/code/htm (1).core-master/build/scripts/CMakeFiles/CMakeOutput.log” below. thanks
I received the file you posted. Unfortunately it did not tell me what happened as I had hoped.
So, I will have to dive deeper into this because it appears something is broken while trying to download the Eigen library. So, I will install Manjaro Linux and Python 3.9 and see if I can reproduce the problem.
In the mean time, there may be a work-around. Try to manually download the Eigen library file.
build
folder and create the folder 'build/ThirdParty/share' .
cd /home/shiva/code/htm (1).core-master (This the top of your repository)
sudo rm -r build
mkdir -p build/ThirdParty/share
https://gitlab.com/libeigen/eigen/-/archive/3.3.9/eigen-3.3.9.tar.bz2
This should manually download the eigen source code. You can also use Wget or cURL
Wget https://gitlab.com/libeigen/eigen/-/archive/3.3.9/eigen-3.3.9.tar.bz2
build/ThirdParty/share/eigen.tar.bz2
(note the name change)python setup.py install --user --force
Hello dear dkeeney Thank you very much for your help and guidance I did what you said step by step, but I got the following error
-- obtaining Eigen CMake Warning (dev) at CMakeLists.txt:10: Syntax Warning in cmake code at column 49
Argument not separated from preceding token by whitespace. This warning is for project developers. Use -Wno-dev to suppress it.
CMake Error at /home/shiva/envs/htmcore2/lib/python3.9/site-packages/cmake/data/share/cmake-3.18/Modules/ExternalProject.cmake:2480 (message): At least one entry of URL is a path (invalid in a list) Call Stack (most recent call first): /home/shiva/envs/htmcore2/lib/python3.9/site-packages/cmake/data/share/cmake-3.18/Modules/ExternalProject.cmake:3206 (_ep_add_download_command) CMakeLists.txt:9 (ExternalProject_Add)
CMake Error at DownloadProject/DownloadProject.cmake:171 (message): CMake step for eigen failed: 1 Call Stack (most recent call first): eigen.cmake:28 (download_project) CMakeLists.txt:89 (include)
-- Configuring incomplete, errors occurred! See also "/home/shiva/code/htm (1).core-master/build/ThirdParty/CMakeFiles/CMakeOutput.log". CMake Error at external/bootstrap.cmake:45 (message): CMake step for Third Party builds failed: 1 Call Stack (most recent call first): CMakeLists.txt:82 (include)
-- 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
The file I downloaded named "eigen-3.3.9.tar.bz2" that I Rename to "eigen.tar.bz2"
Hmmm, interesting. You got a different error....but it still does not tell us where the problem is. This calls CMake within CMake to do the prerequisites and in the process the inner CMake's log is hidden.
I will try to install Manjaro Linux under Virtual Box and see what it does.
I repeated these steps about fifty times. just Once the installation operation was successfully performed.But after that, I would see the same Error again by repeating these steps.I do not understand at all why these errors occur. Some code is now running.For example python hello_sp.py run correctly. but when I run python mnist.py I get this error
[shiva@shiva-pc examples]$ python mnist.py /home/shiva/.local/lib/python3.9/site-packages/sklearn/datasets/_openml.py:65: RuntimeWarning: Invalid cache, redownloading file warn("Invalid cache, redownloading file", RuntimeWarning) Traceback (most recent call last): File "/home/shiva/.local/lib/python3.9/site-packages/sklearn/utils/init.py", line 1081, in check_pandas_support import pandas # noqa ModuleNotFoundError: No module named 'pandas'
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/home/shiva/.local/lib/python3.9/site-packages/sklearn/datasets/_openml.py", line 61, in wrapper return f(*args, **kw) File "/home/shiva/.local/lib/python3.9/site-packages/sklearn/datasets/_openml.py", line 518, in _load_arff_response parsed_arff = parse_arff(arff) File "/home/shiva/.local/lib/python3.9/site-packages/sklearn/datasets/_openml.py", line 332, in _convert_arff_data_dataframe pd = check_pandas_support('fetch_openml with as_frame=True') File "/home/shiva/.local/lib/python3.9/site-packages/sklearn/utils/init.py", line 1084, in check_pandas_support raise ImportError( ImportError: fetch_openml with as_frame=True requires pandas.
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/shiva/.local/lib/python3.9/site-packages/sklearn/utils/init.py", line 1081, in check_pandas_support import pandas # noqa ModuleNotFoundError: No module named 'pandas'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/shiva/code/htm.core-master/py/htm/examples/mnist.py", line 143, in
I really like to be able to run this code correctly on my system, but I do not understand where the problem is and why the installation operation was performed only once, and in other cases, I get the following error
[shiva@shiva-pc htm.core-master]$ python setup.py install --user --force Python version: 3.9.2 (default, Feb 20 2021, 18:40:11) [GCC 10.2.0]
Traceback (most recent call last):
File "/home/shiva/.local/bin/cmake", line 33, in
Ok, I installed the current version of Manjaro and then I installed the base-devel
package and CMake
which is all I should need.
I am using VirtualBox with 4Gb ram, 50Gb disk.
[manjaro@manjaro htm.core]$ gcc --version
gcc (GCC) 10.2.0
[manjaro@manjaro htm.core]$ cmake --version
cmake version 3.20.1
All of the prequequiste third parity modules are downloaded and built successfully. I do get an error but not quite the same as your error. There is a compile error someplace in SpatialPooler.cpp which is when it is building the core library itself. The compiler just aborted without any indication of its problem. That I will have to look at. I don't think we have tried building with this compiler before so there might be something obsolete or needs more resources of some sort.
I also noticed that your build was building with C++14. My build was on C++17 which appears to be the default now. Our library likes C++17.
I will continue to work on this and let you know when I have something that builds completely.
Found the problem...
When I tried the build with 4Gb of RAM, the build kept failing but in different places. When I increased the RAM to 6Gb then it ran successfully.
Here is my final setup: Starting with a fresh install of Manjaro 21.0.2 with KDE on VirtualBox 6.1 Virtual image: 6Gb RAM, 50Gb Storage
sudo pacman -Syu --needed base-devel
sudo pacman -Sy cmake
sudo pacman -Sy make
gcc --version
gcc (GCC) 10.2.0
cmake --version
cmake version 3.20.1
make --version
GNU Make 4.3
python --version
python 3.9.3
git clone https://github.com/htm-community/htm.core.git
cd htm.core
python setup.py install --user --force
python setup.py test
171 passed, 4 skipped, 340 warnings in 76.82s (0:01:16)
So I guess the fix is that if the compiler is aborting, give it more RAM.
Thank you for your valuable help.I have Manjaro Linux and a virtual Windows on it.I got the amount of RAM with the command "free -h" which is as follows:
free -h total used free shared buff/cache available Mem: 7.7Gi 1.2Gi 4.9Gi 413Mi 1.6Gi 5.8Gi Swap: 8.0Gi 0B 8.0Gi
Do you think my problem is the lack of RAM?
sudo pacman -Sy cmake
:: Synchronizing package databases... core is up to date extra is up to date community is up to date multilib is up to date resolving dependencies... looking for conflicting packages...
Packages (1) cmake-3.20.1-1
Total Installed Size: 47.91 MiB
:: Proceed with installation? [Y/n] Y (1/1) checking keys in keyring [########################################] 100% (1/1) checking package integrity [########################################] 100% (1/1) loading package files [########################################] 100% (1/1) checking for file conflicts [########################################] 100% error: failed to commit transaction (conflicting files) cmake: /usr/bin/cmake exists in filesystem cmake: /usr/bin/cpack exists in filesystem cmake: /usr/bin/ctest exists in filesystem Errors occurred, no packages were upgraded.
gcc --version gcc (GCC) 10.2.0
cmake --version
Traceback (most recent call last):
File "/home/shiva/.local/bin/cmake", line 33, in
I am a beginner and I do not know what to do. Please help me and tell me step by step what should I do? At the moment my main problem is that the code does not execute and encounters the following error
[shiva@shiva-pc examples]$ python mnist.py /home/shiva/.local/lib/python3.9/site-packages/sklearn/datasets/_openml.py:65: RuntimeWarning: Invalid cache, redownloading file warn("Invalid cache, redownloading file", RuntimeWarning) Traceback (most recent call last): File "/home/shiva/.local/lib/python3.9/site-packages/sklearn/utils/init.py", line 1081, in check_pandas_support import pandas # noqa ModuleNotFoundError: No module named 'pandas'
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/home/shiva/.local/lib/python3.9/site-packages/sklearn/datasets/_openml.py", line 61, in wrapper return f(*args, **kw) File "/home/shiva/.local/lib/python3.9/site-packages/sklearn/datasets/_openml.py", line 518, in _load_arff_response parsed_arff = parse_arff(arff) File "/home/shiva/.local/lib/python3.9/site-packages/sklearn/datasets/_openml.py", line 332, in _convert_arff_data_dataframe pd = check_pandas_support('fetch_openml with as_frame=True') File "/home/shiva/.local/lib/python3.9/site-packages/sklearn/utils/init.py", line 1084, in check_pandas_support raise ImportError( ImportError: fetch_openml with as_frame=True requires pandas.
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/shiva/.local/lib/python3.9/site-packages/sklearn/utils/init.py", line 1081, in check_pandas_support import pandas # noqa ModuleNotFoundError: No module named 'pandas'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/shiva/HDD2/code/htm.core-master/py/htm/examples/mnist.py", line 143, in
Do you think my problem is the lack of RAM?
No, probably not. I seem to have my installation using a virtual disk in RAM. So apparently the RAM is also containing everything I write to disk. When I shut down the OS, everything I wrote to disk is gone. So that is probably why I ran out of RAM.
PermissionError: [Errno 13] Permission denied: '/usr/lib/python3.9/site-packages/cmake-3.18.4.post1-py3.9-linux-x86_64.egg/cmake/data/bin/cmake'
I suspect that your problem is more likely due to something wrong with your installation of cmake
. It should not give you a permissions error like that.
I suggest finding someone that is more familiar with Monjaro Linux to help you fix the problem with cmake.
Hi Shiva,
When you see an error which looks like this:
ModuleNotFoundError: No module named 'XXX'
It means that you are missing the python package named XXX
and you need to install it on your computer.
In this case you're missing the pandas
package: (https://pypi.org/project/pandas/)
To install the pandas
package, try running this command:
python3 -m pip install --user pandas
Actually, I think you missed a step when installing htm.core
:
pip install -i https://test.pypi.org/simple/ htm.core[examples]
Notice that this line ends with [examples]
, which tells the installer to also install some extra packages which are required for the examples.
Thank you @ctrl-z-9000-times for helping me answer Shiva's question.
However, I don't think PyPi will contain a build for Python 3.8.
I tried it and it gives
[manjaro@manjaro ~]$ pip install -i https://test.pypi.org/simple/ htm.core[examples]
Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: https://test.pypi.org/simple/
ERROR: Could not find a version that satisfies the requirement htm.core[examples]
ERROR: No matching distribution found for htm.core[examples]
So, that is why I had him build from sources.
His problem seems to be the installation of cmake. Can you help with that?
From Shiva's posts it looks like he has cmake-3.20.1-1
installed?
The only advice that I can give about CMake is to try uninstall and reinstall it.
Thanks for your kindness dear dkeeney Apologies for the late reply ,You helped me a lot and your guidance was very valuable to me. Finally I could run the Mnist example of htm.core on my system(not virtualenv). thank you
thank you so much dear ctrl-z-9000-times
I am assuming you were able to now run so I will close this issue.
From: https://discourse.numenta.org/t/error-installing-htm-core/8459 Shiva writes on the htm forum:
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
screenshot: https://aws1.discourse-cdn.com/standard14/uploads/numenta/optimized/2X/1/195be9a04dd777137fb6281521b107b22c714aac_2_1380x776.png