Skip to content
wcyz666 edited this page Jun 19, 2014 · 14 revisions

Installation

Project Download and Environment Setup

Glad that you are interested in reshaping the landscape of SNS. Welcome to the world of SNSApi. There is no tough installation process in deed. Get the stuffs as you do for other projects on GitHub and it's done. This page is here to help new users of Git, GitHub, or Python.

  • First you need Python2.7.
  • Download latest stable version ( zip ; tar.gz )
  • Unzip the package.
  • Install dependencies: [sudo] pip install -r requirements.txt

Now you are ready to go! Suggest you to try some simple commands from snscli.py to see whether there is any problem of your environment.

Mac OS X installation note

For those whose computers are without pip pre-installed, they can use the following commands:

sudo easy_install pip

And some environment variables need to be set before installing the requirement.txt (to avoid "clang unknown arguments" error)

export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments

For some MAC OS version, "-E" arguments must be added to avoid errors.

sudo -E pip install -r requirements.txt

BTW, the installing commands has to be executed with super privilege, otherwise one will encounter many permission denied issue when creating folders.

Windows 7 installation note

There are several dependencies which must be downloaded dateutil, Six, Requests, lxml, httplib2

http://www.lfd.uci.edu/~gohlke/pythonlibs/

Install libxml

At some point, one of our plugin depends on libxml. Default pip install may fail due to lack of files.

On a fresh Ubuntu, here's the quick way to get those dependencies:

[sudo] apt-get install build-essential python-dev libxslt1-dev python-pip

Then you issue normal pip:

[sudo] pip install -r requirements.txt

CDE Distributions

cde is a great tool for packaging. If you have difficulty setting up the environment or you want to have a super fast trial, checkout the following CDE distributions:

After downloading and uncompressing:

cd cde-package/cde-root/home/hpl/snsapi
./snscli.py.cde

Here's a one-liner to get the above things done:

eval "$(curl -fsSL https://gist.github.com/hupili/7020251/raw/get-snsapi-cde.sh)"

NOTE:

  • We already configured some channels using the credentials of our test accounts (conf/channel.json). Please only use those credentials for testing SNSAPI and avoid abuse.
  • The configured channels are all auth-ed. If it prompts auth flow, probably the token has been expired. Please notify us to refresh it.
  • There are some free VMs for you to have a quick test. e.g. sagemath cloud. Just register and execute the above one-liner. You are ready to try the command-line interface of SNSAPI.

Platform Support

SNSApi is able to run on Linux, Windows, OS X and Android. Theoretically, it runs on all platforms if they have Python support. The above mentioned platforms are known to have working instances. See compatibility report from more users.

Clone this wiki locally