What installs "pip"?

Michael keybounce at gmail.com
Sun Nov 18 17:59:19 UTC 2018


On 2018-11-18, at 9:55 AM, Russell Jones <russell.jones at physics.ox.ac.uk> wrote:

> On 18/11/2018 17:41, Michael wrote:
>> Which port actually installs pip?
>> 
>> keybounceMBP:js-beautify michael$ port select --summary
>> Name       Selected  Options
>> ====       ========  =======
>> cython     none      cython27 none
>> db         none      db46 db48 none
>> llvm       none      mp-llvm-3.5 mp-llvm-3.7 mp-llvm-4.0 mp-llvm-5.0 mp-llvm-6.0 none
>> nosetests  none      nosetests27 none
>> pip        none      pip36 none
>> pygments   none      py36-pygments none
>> python     python36  python25-apple python26 python26-apple python27 python27-apple python36 none
>> python2    none      python25-apple python26 python26-apple python27 python27-apple none
>> python3    none      python36 none
>> keybounceMBP:js-beautify michael$ ls /opt/local/bin/pip*
>> 4 /opt/local/bin/pip-3.6@
>> keybounceMBP:js-beautify michael$
>> 
>> 
>> ---
>> Entertaining minecraft videos
>> http://YouTube.com/keybounce
>> 
> In python 3.4+, the pip module is built in. So in python3.7, for 
> instance, you can use python3.7 -m pip. Alternatively, use the port 
> select system, so pip and pip3 are set to pip3.6
> 
> In python2, you need py27-pip, and I guess it shows up in port select 
> similarly.
> 
> Russell

Aha. So,

keybounceMBP:js-beautify michael$ port select pip pip36
Selecting 'pip36' for 'pip' failed: could not create new link "/opt/local/bin/pip" pointing to "/opt/local/Library/Frameworks/Python.framework/Versions/3.6/bin/pip": permission denied
keybounceMBP:js-beautify michael$ sudo !!
sudo port select pip pip36
Password:
Selecting 'pip36' for 'pip' succeeded. 'pip36' is now active.
keybounceMBP:js-beautify michael$ 

While installing pip36 does result in "port select --summary" showing that it is active, it actually is NOT until you run the port select command. Odd.

(Equally odd -- installing python36 in the first place did not install a pip if it is part of the python system).

Side question: Why is there not just a "python3", why do we have to specifically select one of several versions?

---
Entertaining minecraft videos
http://YouTube.com/keybounce



More information about the macports-users mailing list