Configuring Python3 on MacOS Macports

Bill Cole macportsusers-20171215 at
Mon Dec 2 20:36:49 UTC 2019

On 2 Dec 2019, at 13:50, Forrest wrote:

> I'm new to Python and I'm trying to figure out why, for example, when 
> I install aws-cli (from source) using Macports, it doesn't install 
> properly vs /usr/bin/python that does the right thing and places the 
> commands in proper places.   When I run "/opt/local/bin/python 
> install" it ends up buried in directories under the Macports 
> directory structure, which isn't usable.   Maybe I am missing some 
> ENV variables?

Assuming you have Python 3.7 installed using MacPorts:

   port select python python37
   port install py37-awscli
   port select awscli py37-awscli

That gets you the current MacPorts version: 1.16.266. It gives you these 
symlinks in /opt/local/bin:

   aws -> /opt/local/bin/aws-3.7
   aws-3.7 -> 
   aws.cmd -> /opt/local/bin/aws.cmd-3.7
   aws.cmd-3.7 -> 
   aws_bash_completer-3.7 -> 
   aws_completer -> /opt/local/bin/aws_completer-3.7
   aws_completer-3.7 -> 
/opt/local/Library/Frameworks/Python.framework/Versions/3.7/bin/aws_completer -> /opt/local/bin/ -> 

To update that installation to the latest (1.16.293) you can use pip:

   port install py37-pip
   port select pip pip37
   pip install awscli --upgrade --user

Bill Cole
bill at or billcole at
(AKA @grumpybozo and many * addresses)
Not Currently Available For Hire

More information about the macports-users mailing list