简体   繁体   中英

How to add oauth2 package to Eclipse pydev?

I'm attempting to install the oauth2 package from https://pypi.python.org/pypi/oauth2/

This file is (oauth2-1.5.211.tar.gz) .tar.gz format but to add a new library to pydev I need to a .zip or .egg file :

在此处输入图片说明

How can I add this file or an alternative oauth2 library to my pydev installation ?

To get working use following steps :

install easy_installer :

more info here : http://peak.telecommunity.com/DevCenter/EasyInstall This site should offer a link to https://pypi.python.org/pypi/setuptools#windows which contains the easy_installer exe

Once installed ensure the Scripts dir is on your System path, for me this is :

C:\\Python27\\Scripts

Generate the .egg file by running this command dir where oauth2 (where setup.py is located after extracting the downloaded the oauth2 file) is installed :

python setup.py install

This should generate the .egg file in 'dist' folder which you can then add via Eclipse UI.

Note : if using 7zip may need to extract download .ta.gz twice, (once on download file and again on generated extracted file) in order to generate python setup files

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM