Unable to install NuPIC in python3.7

Hello,
I am willing to use HTM for analyzing multivariate time series data. For this I am trying to install nupic in my python 3.7 using pip but following error came:

c:>python -m pip install nupic
Collecting nupic
Using cached https://files.pythonhosted.org/packages/28/9e/1ed355d9ac487bab4854d3514056fa10a239daf7ddad654fe3d772cea3fa/nupic-0.5.6.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File “”, line 1, in
ModuleNotFoundError: No module named 'setuptools’

----------------------------------------

Command “python setup.py egg_info” failed with error code 1 in C:\Users\Research\AppData\Local\Temp\pip-install-rpmnx09p\nupic\

but I have setuptools installed in my python3.7:

c:>python -m pip install setuptools
Requirement already satisfied: setuptools in c:\lib\site-packages (40.6.3)

Please help me for the same.

For now you are able to use nupic only with python 2.x (i’m using 2.7.15). Also for more comfort use virtual enviroments. There is no official support python 3 from numenta team.

1 Like

Unfortunately NuPIC only supports Python 2… NuPIC.core/NuPIC.cpp does support Python3 but they are used directly in C++ mainly. Maybe try ZHTM?

1 Like

Will nupic ever use python 3.x?

I am just starting to learn python and was learning v2, buy python v2 is stabilized.

So, should I learn python v2 or v3?

Thanks.

I would recommend starting with python3. Python2 officially retires in one year (Jan 1st 2020), at which point python3 will be the only official version.

There was a poll regarding what NuPIC should add python 3 support. And most want it.
But I haven’t see much commit about it.

There is an HTM Community effort to update the nupic.core extension library so that it can work with Python3. You can find it at https://github.com/htm-community/nupic.cpp
We are not quite ready for prime time but we are working on it.

Dear All,
Thanks you so much for the information. I installed in python 2.7, now nupic get installed.

However, I am facing the following error:

I have to work with modelfactory but it showing no module found

 from nupic.frameworks.opf.modelfactory import ModelFactory

ImportError: No module named modelfactory

although, I have install the same earlier:

C:\Python27>python -m pip install modelfactory
Requirement already satisfied: modelfactory in c:\python27\lib\site-packages (15)

Please provide a solution.

Are you sure that when you run your python file you are using python 2? I’m not windows user, but 100% problem with wrong python environment.

try this
from nupic.frameworks.opf.model_factory import ModelFactory

there is some updates in the new version of NuPIC

If you cannot import from nupic you probably don’t have it installed correctly. What command did you use to install NuPIC in the python 2 environment?

It worked when I used
“from nupic.frameworks.opf.model_factory import ModelFactory” instead of from nupic.frameworks.opf.modelfactory import ModelFactory

Ah ok great! I missed that. So you must have been copying an old coded sample. May I ask where you got that import statement? If we have old info I want to correct it.