commonsearch / cosr-back

Backend of Common Search. Analyses webpages and sends them to the index.
https://about.commonsearch.org
Apache License 2.0
122 stars 24 forks source link

Getting error running 'make virtualenv' #71

Closed chaconnewu closed 7 years ago

chaconnewu commented 7 years ago

Looks like a Python 3 and 2 compatible issue to me:

Obtaining urlparse4 from git+git://github.com/commonsearch/urlparse4.git@fda910309aa189d57473dbb12e2d2acde49c1736#egg=urlparse4 (from -r requirements.txt (line 25))
  Cloning git://github.com/commonsearch/urlparse4.git (to fda910309aa189d57473dbb12e2d2acde49c1736) to ./venv/src/urlparse4
  Could not find a tag or branch 'fda910309aa189d57473dbb12e2d2acde49c1736', assuming commit.
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 20, in <module>
      File "/Users/yuwu2/practice/cosr-back/venv/src/urlparse4/setup.py", line 46
        print "urlparse4/gurl.cpp not found and Cython failed to run to recreate it. Please install/upgrade Cython and try again."
                                                                                                                                 ^
    SyntaxError: Missing parentheses in call to 'print'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /Users/yuwu2/practice/cosr-back/venv/src/urlparse4```
sylvinus commented 7 years ago

Are you creating a Python3 virtualenv? Common Search only supports Python 2 at the moment. (I think you have to do something like virtualenv -p python2.7)