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

pip install nupic gives error "Command "python setup.py egg_info" failed with error code 1 in..." #3797

Open
cpoptic opened this issue Jan 13, 2018 · 11 comments

Comments

@cpoptic
Copy link

cpoptic commented Jan 13, 2018

I'm running Windows 10.
To reproduce the error:

I've created a virtual environment "numenta-env" with python=3.6
activate numenta-env
pip install nupic

It begins installing and then halts while collected unittest2==0.5.1 (from nupic)

Command "python setup.py egg_info" failed with error code 1 in C:\Users\Chris\AppData\Local\Temp\pip-build-r5de8_q3\unittest2\

Here is the complete output after running pip install nupic

Collecting nupic
Using cached nupic-0.5.6.tar.gz
Collecting asteval==0.9.1 (from nupic)
Using cached asteval-0.9.1.tar.gz
Collecting coverage==3.7.1 (from nupic)
Using cached coverage-3.7.1.tar.gz
Collecting mock==1.0.1 (from nupic)
Using cached mock-1.0.1.zip
Collecting ordereddict==1.1 (from nupic)
Using cached ordereddict-1.1.tar.gz
Collecting psutil==1.0.1 (from nupic)
Using cached psutil-1.0.1.tar.gz
Collecting pytest==2.5.1 (from nupic)
Using cached pytest-2.5.1.tar.gz
Collecting pytest-cov==1.6 (from nupic)
Using cached pytest-cov-1.6.tar.gz
Collecting pytest-xdist==1.8 (from nupic)
Using cached pytest-xdist-1.8.zip
Collecting python-dateutil==2.1 (from nupic)
Using cached python-dateutil-2.1.tar.gz
Collecting PyYAML==3.10 (from nupic)
Using cached PyYAML-3.10.tar.gz
Collecting unittest2==0.5.1 (from nupic)
Using cached unittest2-0.5.1.zip
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\Chris\AppData\Local\Temp\pip-build-r5de8_q3\unittest2\setup.py", line 12, in
from unittest2 import version as VERSION
File "C:\Users\Chris\AppData\Local\Temp\pip-build-r5de8_q3\unittest2\unittest2_init_.py", line 40, in
from unittest2.collector import collector
File "C:\Users\Chris\AppData\Local\Temp\pip-build-r5de8_q3\unittest2\unittest2\collector.py", line 3, in
from unittest2.loader import defaultTestLoader
File "C:\Users\Chris\AppData\Local\Temp\pip-build-r5de8_q3\unittest2\unittest2\loader.py", line 92
except Exception, e:
^
SyntaxError: invalid syntax

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

Command "python setup.py egg_info" failed with error code 1 in C:\Users\Chris\AppData\Local\Temp\pip-build-r5de8_q3\unittest2\

I've tried unintstalling and reinstalling setuptools, but no joy.
Incredibly frustrating to sink several hours debugging and reinstalling packages with zero to show for the effort.

@MikeZhu92
Copy link

Same here. I'm using python 3.5 fresh install and here is the error msgs

Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-lnltf0jn/unittest2/setup.py", line 12, in <module>
        from unittest2 import __version__ as VERSION
      File "/tmp/pip-build-lnltf0jn/unittest2/unittest2/__init__.py", line 40, in <module>
        from unittest2.collector import collector
      File "/tmp/pip-build-lnltf0jn/unittest2/unittest2/collector.py", line 3, in <module>
        from unittest2.loader import defaultTestLoader
      File "/tmp/pip-build-lnltf0jn/unittest2/unittest2/loader.py", line 92
        except Exception, e:
                        ^
    SyntaxError: invalid syntax
  
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-lnltf0jn/unittest2/

@MikeZhu92
Copy link

It seems like Nupic only works for Python 2.7 so this issue should be closed.
According to my knowledge Python 2.7 will not be maintained past 2020 though.

@MZamanMughal
Copy link

No same here for python 2.7 @MikeZhu92

@MikeZhu92
Copy link

MikeZhu92 commented Jan 22, 2018

Is that for Ubuntu or Windows ?
Ubuntu works for me at least.
For windows platform I would recommend to check the C++ compiler.
@MZamanMughal

@rhyolight
Copy link
Member

@MZamanMughal Are you saying that you go this error with python 2.7? This error looks like a python 3 error. Sometimes it happens when you have multiple pythons installed and the wrong one is being invoked.

@CJJC1220
Copy link

CJJC1220 commented Jun 5, 2018

I have come across such a problem, anybody has a solution for this?thanks
C:\Users\CJJC>pip install gdsCAD
Collecting gdsCAD
Using cached https://files.pythonhosted.org/packages/d0/54/60b48ee74d5ba364c4aaaf6a73e0d47274a501aafd3d64b04ce7b03b40f9/gdsCAD-0.4.5.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\CJJC\AppData\Local\Temp\pip-install-q3i3z0gl\gdsCAD\setup.py", line 4, in
from git_version import sdist, get_version
File "C:\Users\CJJC\AppData\Local\Temp\pip-install-q3i3z0gl\gdsCAD\git_version.py", line 107
print get_version()
^
SyntaxError: invalid syntax


Command "python setup.py egg_info" failed with error code 1 in C:\Users\CJJC\AppData\Local\Temp\pip-install-q3i3z0gl\gdsCAD\

@paris18e
Copy link

paris18e commented Jul 3, 2018

@MikeZhu92 Happened for Mac too...

@rhyolight
Copy link
Member

To Everyone having this problem: Try uninstalling NuPIC completely, then run pip install nupic [--user] again. Make sure you are not running python 3.

@ibobak
Copy link

ibobak commented Mar 21, 2019

Guys, now is the year 2019. Python 2 will soon be shut down. We all are migrating code on Python 3.

And, until now you did not do migration onto Python 3 ???

@rhyolight
Copy link
Member

This codebase is in maintenance mode. New HTM python code will not be written here. See the community fork for Python 3.

@arb-git
Copy link

arb-git commented May 7, 2021

Thanks @rhyolight!
Though the community fork also has a problem, which makes it unusable:

ERROR: Could not find a version that satisfies the requirement nupic.bindings>=1.0.6 (from nupic==1.0.6.dev0) (from versions: 1.0.1)
ERROR: No matching distribution found for nupic.bindings>=1.0.6 (from nupic==1.0.6.dev0)

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

8 participants