Error with pip install nupic.bindings

Hi!

I am trying to compare performance between htm.core and nupic, however, when installing the nupic.bindings module to test NuPIC I get the folllowing error:

C:\Users\Helena\Desktop\TFM\repo\nupic\src>py -2.7 -m pip install nupic.bindings --user --no-cache
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at Release process - pip documentation v23.0.dev0 pip 21.0 will remove support for this functionality.
Collecting nupic.bindings
Downloading nupic.bindings-1.0.6-cp27-none-win_amd64.whl (4.8 MB)
|################################| 4.8 MB 2.2 MB/s
Collecting pytest==3.0.7
Downloading pytest-3.0.7-py2.py3-none-any.whl (172 kB)
|################################| 172 kB 3.3 MB/s
Collecting pytest-xdist==1.16.0
Downloading pytest-xdist-1.16.0.tar.gz (88 kB)
|################################| 88 kB 6.1 MB/s
ERROR: Command errored out with exit status 1:
command: ‘C:\Python27\python.exe’ -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’“‘c:\users\helena\appdata\local\temp\pip-install-roemam\pytest-xdist\setup.py’”’“‘; file=’”‘“‘c:\users\helena\appdata\local\temp\pip-install-roemam\pytest-xdist\setup.py’”’“';f=getattr(tokenize, '”‘“‘open’”’“‘, open)(file);code=f.read().replace(’”‘"’\r\n’“'”‘, ‘"’"’\n’“'”‘);f.close();exec(compile(code, file, ‘"’“‘exec’”’“‘))’ egg_info --egg-base ‘c:\users\helena\appdata\local\temp\pip-pip-egg-info-tryxec’
cwd: c:\users\helena\appdata\local\temp\pip-install-roemam\pytest-xdist
Complete output (56 lines):
Traceback (most recent call last):
File “”, line 1, in
File “c:\users\helena\appdata\local\temp\pip-install-roemam\pytest-xdist\setup.py”, line 37, in
‘Programming Language :: Python :: 3’,
File “C:\Python27\lib\distutils\core.py”, line 111, in setup
setup_distribution = dist = klass(attrs)
File “C:\Python27\lib\site-packages\setuptools\dist.py”, line 348, in init
self.fetch_build_eggs(attrs[‘setup_requires’])
File “C:\Python27\lib\site-packages\setuptools\dist.py”, line 394, in fetch_build_eggs
replace_conflicting=True,
File "C:\Python27\lib\site-packages\pkg_resources_init
.py”, line 826, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File “C:\Python27\lib\site-packages\pkg_resources_init_.py”, line 1098, in best_match
return self.obtain(req, installer)
File “C:\Python27\lib\site-packages\pkg_resources_init_.py”, line 1110, in obtain
return installer(requirement)
File “C:\Python27\lib\site-packages\setuptools\dist.py”, line 461, in fetch_build_egg
return cmd.easy_install(req)
File “C:\Python27\lib\site-packages\setuptools\command\easy_install.py”, line 664, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File “C:\Python27\lib\site-packages\setuptools\command\easy_install.py”, line 694, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File “C:\Python27\lib\site-packages\setuptools\command\easy_install.py”, line 875, in install_eggs
return self.build_and_install(setup_script, setup_base)
File “C:\Python27\lib\site-packages\setuptools\command\easy_install.py”, line 1114, in build_and_install
self.run_setup(setup_script, setup_base, args)
File “C:\Python27\lib\site-packages\setuptools\command\easy_install.py”, line 1100, in run_setup
run_setup(setup_script, args)
File “C:\Python27\lib\site-packages\setuptools\sandbox.py”, line 249, in run_setup
raise
File “C:\Python27\lib\contextlib.py”, line 35, in exit
self.gen.throw(type, value, traceback)
File “C:\Python27\lib\site-packages\setuptools\sandbox.py”, line 197, in setup_context
yield
File “C:\Python27\lib\contextlib.py”, line 35, in exit
self.gen.throw(type, value, traceback)
File “C:\Python27\lib\site-packages\setuptools\sandbox.py”, line 168, in save_modules
saved_exc.resume()
File “C:\Python27\lib\site-packages\setuptools\sandbox.py”, line 143, in resume
six.reraise(type, exc, self._tb)
File “C:\Python27\lib\site-packages\setuptools\sandbox.py”, line 156, in save_modules
yield saved
File “C:\Python27\lib\site-packages\setuptools\sandbox.py”, line 197, in setup_context
yield
File “C:\Python27\lib\site-packages\setuptools\sandbox.py”, line 246, in run_setup
DirectorySandbox(setup_dir).run(runner)
File “C:\Python27\lib\site-packages\setuptools\sandbox.py”, line 276, in run
return func()
File “C:\Python27\lib\site-packages\setuptools\sandbox.py”, line 245, in runner
_execfile(setup_script, ns)
File “C:\Python27\lib\site-packages\setuptools\sandbox.py”, line 46, in _execfile
code = compile(script, filename, ‘exec’)
File “c:\users\helena\appdata\local\temp\easy_install-osquqt\setuptools_scm-7.0.5\setup.py”, line 20
def scm_version() → str:
^
SyntaxError: invalid syntax
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Does anybody know the reason why it may happen?

In my case the setuptools package need to upgraded explicitly. Could be the same problem here.

For a Windows 2010 setup I had to do the following steps:

  1. 64 Bit Installer of python 2.7 (32 didn’t work)
    https://www.python.org/ftp/python/2.7.18/python-2.7.18.amd64.msi
  2. pip Install Script for windows (download and run it)
    https://bootstrap.pypa.io/pip/2.7/get-pip.py
  3. python vc redist:
    https://web.archive.org/web/20200709160228if_/https://download.microsoft.com/download/7/9/6/796EF2E4-801B-4FC4-AB28-B59FBF6D907B/VCForPython27.msi
  4. then upgrade setuptools
  5. install nupic.bindings
  6. install nupic