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

otauth2 pip installation failure with django 1.7 and 1.8 #24

Open
jcda opened this issue Aug 22, 2015 · 4 comments
Open

otauth2 pip installation failure with django 1.7 and 1.8 #24

jcda opened this issue Aug 22, 2015 · 4 comments

Comments

@jcda
Copy link

jcda commented Aug 22, 2015

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
Copy link
Contributor

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

@jcda
Copy link
Author

jcda commented Aug 25, 2015

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

@ponty96
Copy link

ponty96 commented Oct 30, 2015

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
Copy link

elebumm commented Jun 20, 2017

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

dereklarmstrong pushed a commit to dereklarmstrong/django-hackathon-starter that referenced this issue Mar 16, 2023
json response for instagram user data + tumblr login
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

4 participants