0

I am new to Python and I am trying to install recsys package.

http://ocelma.net/software/python-recsys/build/html/installation.html

For this i need to install some pre-requiste packages, so i have to run this using pip

pip install csc-pysparse networkx divisi2

But whenever i run this i get the following in logs

    Collecting csc-pysparse
  Using cached csc-pysparse-1.1.1.4.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\64\AppData\Local\Temp\pip-build-wn7_65_9\csc-pysparse\
setup.py", line 33
        print 'setuptools module not found.'
                                           ^
    SyntaxError: Missing parentheses in call to 'print'

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

Command "python setup.py egg_info" failed with error code 1 in C:\Users\i054564\ AppData\Local\Temp\pip-build-wn7_65_9\csc-pysparse\

I checked that setuptools exist in my python installation here

C:\Python34\lib\site-packages

I have ran everything from unstinalling setuptools to install it again, upgrade command, but it does not work.

Not able to figure out why setuptools is not found. Is it not found in the path of where pip resolves it from ?

cheers,

Saurav

ivan_pozdeev
  • 33,874
  • 19
  • 107
  • 152
saurav
  • 5,388
  • 10
  • 56
  • 101

2 Answers2

0

The code triggering the error is Python 2-specific and is illegal in Python 3.

Apparently, csc-pysparse doesn't support Python 3 (its README only mentions 2.6) and looks abandoned (6 years since last commit).

Some guys out there suggest replacing it with SciPy.

ivan_pozdeev
  • 33,874
  • 19
  • 107
  • 152
  • Yes.. .you are right Ivan..pretty hard for newbie to figure out :) .that was the problem...strange that lot of libraries have not migrated – saurav Sep 29 '16 at 10:52
-1

The error is coming from the installation code of recsys package. In order to avoid this error, you need to install setuptools separately.

For debian machines, the below command will work.

sudo apt-get install python3-setuptools

For other machines, please checkout installation instructions at the link

Once setuptools package is installed, you can proceed with csc-pysparse installation.

Community
  • 1
  • 1
  • tried all the options mentioned there...i am on Windows...problem is pip not able to resolve setuptools inspite of setuptools being installed – saurav Sep 29 '16 at 10:38