Friday, 15 May 2015

Manually installing a Python library -



Manually installing a Python library -

i'm trying install particular python library (https://github.com/bitly/bitly-api-python/).

the recommended method using pip, pip doesn't work behind university's authenticated proxy system. i'm trying install manually. has setup.py file. tried sudo python setup.py install , said:

running install checking .pth file back upwards in /usr/local/lib/python2.7/dist-packages/ /usr/bin/python -e -c pass test passed: /usr/local/lib/python2.7/dist-packages/ appears back upwards .pth files running bdist_egg running egg_info writing bitly_api.egg-info/pkg-info writing top-level names bitly_api.egg-info/top_level.txt writing dependency_links bitly_api.egg-info/dependency_links.txt reading manifest file 'bitly_api.egg-info/sources.txt' reading manifest template 'manifest.in' writing manifest file 'bitly_api.egg-info/sources.txt' installing library code build/bdist.linux-x86_64/egg running install_lib running build_py creating build/bdist.linux-x86_64/egg creating build/bdist.linux-x86_64/egg/bitly_api copying build/lib.linux-x86_64-2.7/bitly_api/__init__.py -> build/bdist.linux-x86_64/egg/bitly_api copying build/lib.linux-x86_64-2.7/bitly_api/bitly_http.py -> build/bdist.linux-x86_64/egg/bitly_api copying build/lib.linux-x86_64-2.7/bitly_api/bitly_api.py -> build/bdist.linux-x86_64/egg/bitly_api byte-compiling build/bdist.linux-x86_64/egg/bitly_api/__init__.py __init__.pyc byte-compiling build/bdist.linux-x86_64/egg/bitly_api/bitly_http.py bitly_http.pyc byte-compiling build/bdist.linux-x86_64/egg/bitly_api/bitly_api.py bitly_api.pyc creating build/bdist.linux-x86_64/egg/egg-info copying bitly_api.egg-info/pkg-info -> build/bdist.linux-x86_64/egg/egg-info copying bitly_api.egg-info/sources.txt -> build/bdist.linux-x86_64/egg/egg-info copying bitly_api.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/egg-info copying bitly_api.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/egg-info copying bitly_api.egg-info/zip-safe -> build/bdist.linux-x86_64/egg/egg-info creating 'dist/bitly_api-0.2-py2.7.egg' , adding 'build/bdist.linux-x86_64/egg' removing 'build/bdist.linux-x86_64/egg' (and under it) processing bitly_api-0.2-py2.7.egg removing '/usr/local/lib/python2.7/dist-packages/bitly_api-0.2-py2.7.egg' (and under it) creating /usr/local/lib/python2.7/dist-packages/bitly_api-0.2-py2.7.egg extracting bitly_api-0.2-py2.7.egg /usr/local/lib/python2.7/dist-packages bitly-api 0.2 active version in easy-install.pth installed /usr/local/lib/python2.7/dist-packages/bitly_api-0.2-py2.7.egg processing dependencies bitly-api==0.2 finished processing dependencies bitly-api==0.2

which looks successfull installation. if python , import bitlyapi, python says importerror: no module named bitlyapi.

what doing wrong?

btw next guide: http://www.pythonforbeginners.com/code-snippets-source-code/bitly-shortener-with-python/

the name of directory seams bitly_api.

so import bitly_api in python

python

No comments:

Post a Comment