Macos – How to install s3cmd on Mac OS X Yosemite

installationmacmacospythons3cmd

I am using Mac OS X Yosemite and want to install s3cmd from S3Tools. Here is a summary of what I have done so far:

  1. Downloaded and extracted the .tar.gz.
  2. Moved the resulting directory to /usr/local/src
  3. cd /usr/local/src/s3cmd-1.5.0
  4. sudo python setup.py install
  5. s3cmd --configure, displays error message saying Please install the python dateutil module
  6. Installed Homebrew
  7. brew install python (to install pip)
  8. pip install python-dateutil
  9. s3cmd --configure, or s3cmd du s3://bucket-name

At step 9 I still get the error message about the dateutil module:

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 
ImportError trying to import dateutil.parser. 
Please install the python dateutil module: 
$ sudo apt-get install python-dateutil
   or 
$ sudo yum install python-dateutil
   or 
$ pip install python-dateutil
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Best Answer

Or you can keep it simple and use Homebrew to install/manage many of the AWS tools, including s3cmd

  1. Install Homebrew by running this command

    ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
    
  2. Look for the code you want

    $ brew search s3
    s3-backer  s3cmd      s3fs   s3sync     unfs3
    
  3. Install s3cmd

    brew install s3cmd
    

The installer will do all of the dirty work including get dependancies and symlink to your /Applications folder (depending on the app you install).

  1. Want the latest version?

    brew update
    

I've been using this for the awscli tools for months with great success. GL.

Related Question