Note: The Python language bindings here are no longer being actively developed. We recommend using our Python SDK, pyrax, in its place when possible. You can get more information on the Python SDK on our API documentation site.
Contents |
This Tutorial will take us step by step through the installation of Cloud Files Python API; in both Windows and *nix Operating systems(Should be the same for MacOSX)
In this tutorial we only cover how to install the Cloud Files Python API. For Installation steps for Python: the Language see Python's website for more info.
setup.py install
You should get some output from the console and then return to the command prompt.
In this tutorial we only cover how to install the Cloud Files Python API. For Installation steps for Python: the Language see Python's website for more info.
cd ~/Desktop
Now go ahead and untar. The command should look like this:
tar zxvf rackspace-python-cloudfiles-e8c1625ffa59d42c85215e5b176af1ba376df00b
This should unpack the files unto your desktop that number at the end may not match so please ensure you are using the right tar name you can use tab to auto complete this. Now go ahead and cd into the directory
cd rackspace-python-cloudfiles-e8c1625ffa59d42c85215e5b176af1ba376df00b
For Most RedHat Based distros its:
su
Enter Root Password then:
python setup.py install
For Debian Based Distros its:
sudo python setup.py install
Now for the fun part lets see if the install worked.
Open IDLE for *nix head to command line and type idle at the command line and it will execute the IDE. For Windows Head to start -> all programs -> python2.6 -> IDLE (Python GUI)
Then inside of the Idle Window type in:
>>> import cloudfiles
Hit enter if you get nothing in return. You were successful in installing the API!
>>> import cloudfiles >>>
If you get something like this:
>>> import cloudfiles
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import cloudfiles
ImportError: No module named cloudfiles
>>>
Something is wrong double check your library path is correct and the api files are saved in the right place. For more info on where your default library path is; please take a look at the python documentation for your operating system.
© 2011-2013 Rackspace US, Inc.
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License

5 Comments
Doesn't work on Python 2.7
Traceback (most recent call last):
File "setup.py", line 2, in <module>
from setuptools import setup, find_packages
Doesn't work on Python 2.7
re: Python 2.7
sudo apt-get update
sudo apt-get install python-setuptools
That should allow you to continue the installation.
Github Page does not exist and error with duplicity
I've tried to install the cloudfiles api but the link you provided here leads to a non-existing page. After that, I've been to your github page and download the python binding (https://github.com/rackspace/pyrax). I've tried to used duplicity to get a backup but I got the following error message: "BackendException: This backend requires the cloudfiles library available from Rackspace." Do you guys have any clue of what is going on?
Thanks,
JV
re: Github page
https://github.com/rackerlabs/python-cloudfiles
I'll get the link in this article updated. You should be able to use that to satisfy Duplicity's dependency.
Add new comment