Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a Quickstart somewhere? #10

Closed
RDaneelOlivav opened this issue Oct 3, 2019 · 8 comments
Closed

Is there a Quickstart somewhere? #10

RDaneelOlivav opened this issue Oct 3, 2019 · 8 comments

Comments

@RDaneelOlivav
Copy link

Hi,

Trying to get the example made by @Zbysekz working but juts cant start the main.py:

(ri_venv) rdaneel (master *) python $ python main.py
Traceback (most recent call last):
File "main.py", line 14, in
from htm.bindings.algorithms import SpatialPooler
ImportError: No module named htm.bindings.algorithms

I tried to install and compile the nupic.cpp but ran into an issue: htm-community/htm.core#702

Any ideas? Suggestions?

@Zbysekz
Copy link
Collaborator

Zbysekz commented Oct 3, 2019

You will get and advice in the repo issue how to correctly install htm.core, but maybe you can also install from binary releases (they are up to date) https://github.com/htm-community/htm.core/releases

@RDaneelOlivav
Copy link
Author

RDaneelOlivav commented Oct 4, 2019

Thanks!
I git the htm.core installed for python3.7 virtual environment. Tried python 2.7 but it gave this error even after installing the requierements:

(ri_venv2.7) rdaneel RI $ python -m pip install -i https://test.pypi.org/simple/ htm.core
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Looking in indexes: https://test.pypi.org/simple/
Collecting htm.core
ERROR: Could not find a version that satisfies the requirement htm.core (from versions: none)
ERROR: No matching distribution found for htm.core

Once I downloaded the htm-2d-object-modeling git, I executed the python/main.py and got this error:

(ri_venv3.7) rdaneel (master) python $ python main.py
Traceback (most recent call last):
File "main.py", line 14, in
from htm.bindings.algorithms import SpatialPooler
ImportError: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.27' not found (required by /home/rdaneel/RI/ri_venv3.7/lib/python3.7/site-packages/htm/bindings/algorithms.cpython-37m-x86_64-linux-gnu.so)

I really dont know if this is related to using python 3.7 or what exactly. Used python 3.7 because aparently htm-community/htm.core#19.

I'll leave here the instalation script and any help will be appreciated. I cant wait to start digging in the code, but these setup issues are getting in the way :(.

install_htm2dobjects.sh

@Zbysekz
Copy link
Collaborator

Zbysekz commented Oct 7, 2019

  • There is no point to trying to run htm2D project if the htm.core installation failed.
  • type "python --version" in console, what it returns? because it seems that if you type this:

(ri_venv2.7) rdaneel RI $ python -m pip install -i https://test.pypi.org/simple/ htm.core
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your ...

its not using python3.7

check also this further in your sh script, you can use "python3" or "python3.7" keyword depending on you OS variables

@Zbysekz
Copy link
Collaborator

Zbysekz commented Oct 7, 2019

Or maybe i misunderstood and you was able to install htm.core with py3.7 with no error

@RDaneelOlivav
Copy link
Author

(ri_venv3.7) rdaneel RI $ python -m pip install -i https://test.pypi.org/simple/ htm.core
Looking in indexes: https://test.pypi.org/simple/
Collecting htm.core
Using cached https://test-files.pythonhosted.org/packages/26/d0/adff7d1cf6650d4806cfabb5451ee3f93e575116eaca5121afd7998c97c3/htm.core-2.0.18-cp37-cp37m-manylinux1_x86_64.whl
Requirement already satisfied: numpy>=1.15 in ./ri_venv3.7/lib/python3.7/site-packages (from htm.core) (1.17.2)
Requirement already satisfied: pytest==4.6.5 in ./ri_venv3.7/lib/python3.7/site-packages (from htm.core) (4.6.5)
Requirement already satisfied: mock>=1.0.1 in ./ri_venv3.7/lib/python3.7/site-packages (from htm.core) (3.0.5)
Requirement already satisfied: prettytable>=0.7.2 in ./ri_venv3.7/lib/python3.7/site-packages (from htm.core) (0.7.2)
Requirement already satisfied: hexy>=1.4.3 in ./ri_venv3.7/lib/python3.7/site-packages (from htm.core) (1.4.3)
Requirement already satisfied: atomicwrites>=1.0 in ./ri_venv3.7/lib/python3.7/site-packages (from pytest==4.6.5->htm.core) (1.3.0)
Requirement already satisfied: six>=1.10.0 in ./ri_venv3.7/lib/python3.7/site-packages (from pytest==4.6.5->htm.core) (1.12.0)
Requirement already satisfied: py>=1.5.0 in ./ri_venv3.7/lib/python3.7/site-packages (from pytest==4.6.5->htm.core) (1.8.0)
Requirement already satisfied: packaging in ./ri_venv3.7/lib/python3.7/site-packages (from pytest==4.6.5->htm.core) (19.2)
Requirement already satisfied: wcwidth in ./ri_venv3.7/lib/python3.7/site-packages (from pytest==4.6.5->htm.core) (0.1.7)
Requirement already satisfied: attrs>=17.4.0 in ./ri_venv3.7/lib/python3.7/site-packages (from pytest==4.6.5->htm.core) (19.2.0)
Requirement already satisfied: more-itertools>=4.0.0; python_version > "2.7" in ./ri_venv3.7/lib/python3.7/site-packages (from pytest==4.6.5->htm.core) (7.2.0)
Requirement already satisfied: importlib-metadata>=0.12 in ./ri_venv3.7/lib/python3.7/site-packages (from pytest==4.6.5->htm.core) (0.23)
Requirement already satisfied: pluggy<1.0,>=0.12 in ./ri_venv3.7/lib/python3.7/site-packages (from pytest==4.6.5->htm.core) (0.13.0)
Requirement already satisfied: pyparsing>=2.0.2 in ./ri_venv3.7/lib/python3.7/site-packages (from packaging->pytest==4.6.5->htm.core) (2.4.2)
Requirement already satisfied: zipp>=0.5 in ./ri_venv3.7/lib/python3.7/site-packages (from importlib-metadata>=0.12->pytest==4.6.5->htm.core) (0.6.0)
Installing collected packages: htm.core
Successfully installed htm.core-2.0.18

Then I install the requirements for htm-2d-object:
(ri_venv3.7) rdaneel (master *) python $ pwd
/home/rdaneel/RI/htm-2d-object-modeling/python
python -m pip install --no-cache-dir -r requirements.txt

I successfully installed htm.core with python 3.7 venv.
But when I execute:

(ri_venv3.7) rdaneel (master *) python $ python3.7 main.py
Traceback (most recent call last):
File "main.py", line 14, in
from htm.bindings.algorithms import SpatialPooler
ImportError: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.27' not found (required by /home/rdaneel/RI/ri_venv3.7/lib/python3.7/site-packages/htm/bindings/algorithms.cpython-37m-x86_64-linux-gnu.so)

I'm using an Ubuntu 16, that might be it? Don't really know the issue here. Whats the setup you recommend to work with then?

@Zbysekz
Copy link
Collaborator

Zbysekz commented Oct 8, 2019

I am using Ubuntu 18.04 (Bionic Beaver), not using virtualenv, just directly python in OS, since i have also troubles with it. Using python 3.6. I am building hmt.core from source (see help in repo)

@RDaneelOlivav
Copy link
Author

I tried this smae procedure in a VMachin in Ubuntu 18, venc python 3.7 and at least no errors appeared . The python main.py gave some output and no errors.

So now my question is: where can a find the ode and execute the demo you @Zbysekz gave of an interactive moving object with the detections?

Image Experiment

@Zbysekz
Copy link
Collaborator

Zbysekz commented Jun 10, 2020

related to #16 which is in progress

@Zbysekz Zbysekz closed this as completed Jun 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants