Python packages installed using pip not on PATH

Ryan Schmidt ryandesign at macports.org
Wed Jul 15 16:49:02 PDT 2015


On Jul 13, 2015, at 6:36 AM, Behrang Saeedzadeh wrote:

> In order to use awscli, I installed Python 3.4.3 and pip for Python 3.4.3.
> 
> According to AWS Docs, I should be able to install awscli by running
> 
>    pip install awscli
> 
> However it failed due to some permission issues: https://gist.github.com/behrangsa/6d2ed5755e511e876f68
> 
> I reran pip with sudo and this time installation completed successfully.
> 
> According to the docs:
> 
> Pip installs the aws executable to /usr/bin/aws. The awscli library (which does the actual work) is installed to the 'site-packages' folder in Python's installation directory.
> 
> But for some reason, it is not installed there. It is not installed in /opt/local/bin either.
> 
> Apparently it is installed in /opt/local/Library/Frameworks/Python.framework/Versions/Current/bin (which is a symlink to opt/local/Library/Frameworks/Python.framework/Versions/3.4.
> 
> Should I just add /opt/local/Library/Frameworks/Python.framework/Versions/Current/bin to the PATH, or is there a better alternative available?

MacPorts should be the only software installing files into the MacPorts prefix (/opt/local); using pip (or anything else) to install software into the MacPorts prefix is not recommended.

To install awscli for use with MacPorts python34, use "sudo port install py34-awscli".

If you would like to make the awscli programs available without a version suffix in /opt/local/bin, use "sudo port select awscli".



More information about the macports-users mailing list