views:

23

answers:

2

I'm fairly noob at the using the terminal and doing server administration. I recently "inherited" a Twitter app, and I need to install a Python OAuth library:

http://dev.twitter.com/pages/oauth_libraries#python

Unfortunately, I'm pretty much clueless about how to:

  1. download a library to the server
  2. installing the library on the server so I can "import "

Can someone please walk me through this process? Or, provide me with resources that will?

Thanks!!

A: 

The easiest solution is probably to run 'easy_install' as root using the same python that runs the application (there may be different versions of python). You may need to install a package such as 'setuptools' first, or download and run the easy_install-installer as follows:

# wget  http://peak.telecommunity.com/dist/ez_setup.py
# python ./ez_setup.py

But again, only do this if you don't have easy_install

Ivo van der Wijk
A: 

The 'best' way to do it depends on how you run your application (mod_python, cgi or wsgi). With WSGI the best way would be to have a seperate virtualenv for each site in which you install things for that site only. This way you can have different versions of the same library installed which is also a big plus for development but even more so for websites where you might want to keep one website on the older version of a lib and another on the newer version.

A few links to get you started:

WSGI + virtualenv, virtualenv

Any question you can add as a comment.

ikanobori