导入错误Linkedin API

2024-09-30 12:22:49 发布

您现在位置:Python中文网/ 问答频道 /正文

当我试图执行这段代码时

from linkedin import linkedin
from oauthlib import *

authentication = linkedin.LinkedInDeveloperAuthentication(CONSUMER_KEY,
                                 CONSUMER_SECRET, 
                                 USER_TOKEN, USER_SECRET, 
                                 RETURN_URL, 
                                 linkedin.PERMISSIONS.enums.values())

# Pass it in to the app...

application = linkedin.LinkedInApplication(authentication)

# Use the app....

g = application.get_profile()
print g

我得到这个错误。在

^{pr2}$

但我已经安装了所有这些库-

linkedin,python-linkedin,requests,oauthlib

为什么我在安装了所有库的情况下仍出现此错误?在


Tags: thekey代码fromimportappsecretauthentication
1条回答
网友
1楼 · 发布于 2024-09-30 12:22:49

你和你的两个linkedin库有冲突。 两者都是使用您的import linkedin语句调用的。在

为了使其正常工作,您应该卸载linkedin one,linkedin DeveloperAuthentication对象位于PythonLinkedIn one中,使用pip。在

pip uninstall linkedin

相关问题 更多 >

    热门问题