DrkSephy / django-hackathon-starter

A boilerplate for Django web applications
1.61k stars 298 forks source link

otauth2 pip installation failure with django 1.7 and 1.8 #24

Open jcda opened 8 years ago

jcda commented 8 years ago

during the pip install -r requirements.txt I have the following message

Collecting nose==1.3.4 (from -r requirements.txt (line 23)) Downloading nose-1.3.4-py3-none-any.whl (154kB) 100% |████████████████████████████████| 155kB 474kB/s Collecting oauth2==1.5.211 (from -r requirements.txt (line 24)) Downloading oauth2-1.5.211.tar.gz Complete output from command python setup.py egg_info: Traceback (most recent call last): File "", line 20, in File "/tmp/pip-build-a8l23vkw/oauth2/setup.py", line 18 print "unable to find version in %s" % (VERSIONFILE,) ^ ## SyntaxError: invalid syntax Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-a8l23vkw/oauth2 I tried with django 1.7 and 1.8 virtual environments with python3 has anyone else met the same issue ? Thanks in advance
lsxliron commented 8 years ago

Seems like the oath2 does not support python 3... Try to use python 2.7

jcda commented 8 years ago

Yes, this works with python2.7 . Thanks. ( I need python3 though, so I will have to be creative)

ponty96 commented 8 years ago

but you can use oauth2 1.90post1 with django 1.7 && django 1.8. @lsxliron hope that doesnt affect the boilerplate cause i just have to use python 3....

elebumm commented 7 years ago

Anyone from the future (including me) who runs into this problem there is a fix for this that will lead you into another problem. So it turns out that at the time (2015 was when this issue was submitted) the oauth2 package has been deprecated and now has a new maintainer, however, this hasn't been added in the requirements.txt yet. So to get over this issue using Python 3 go into requirements.txt and change the oauth2 line to look like this:

oauth2==1.9.0.post1

This is updated for Python 3. You will then run into the same error except for the wsgiref package. I did some research and it looks like there is no Python 3 compatibility! For years I have seen people talk about Python 2 packages not converting to Python 3 and this is the first example of it. God damn.

TL;DR: Use Python 2 to install packages using this command: pip2.7 install -r requirements.txt