Search This Blog

Wednesday, April 3, 2013

How to install Rackspace Python SDK for cloud

The full summary of all posts for API Rackspace challenge can be found here:
Rackspace api-challenge summary

The Python SDK is available here. It is very simple to install it in any modern Linux distribution.
aptitude install python-pip
pip install pyrax

In Windows we need to do couple things more.
  • Download and install the distribute Python package

  • Use your browser to download the file or if you want to use curl in Windows take a look at  this instructions Powershell as Bash substitute on Windows. From powershell it can look like this:
    PS C:\Users\radoslaw> curl -O
    PS C:\Users\radoslaw> python

  • Download and install the pip Python package 
    PS C:\Users\radoslaw> curl -O
    PS C:\Users\radoslaw> python

  • Check that you can execute pip from command line

  • If you have to modify your PATH variable this blog can be helpful.
    PS C:\Users\radoslaw> pip
      pip  [options]

  • Lastly install pyrax SDK module and test it 

  • If everything went fine you should see similar output.
    PS C:\Users\radoslaw> python
    Python 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500 64 bit (AMD64)] on win32
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import pyrax
    >>> pyrax
    <module 'pyrax' from 'c:\Python27\lib\site-packages\pyrax\__init__.pyc'>

No comments:

Post a Comment