Discussion:
What installs "pip"?
Add Reply
Michael
2018-11-18 17:41:52 UTC
Reply
Permalink
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
Russell Jones
2018-11-18 17:55:12 UTC
Reply
Permalink
Post by Michael
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*
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.
Michael
2018-11-18 17:59:19 UTC
Reply
Permalink
Post by Russell Jones
Post by Michael
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*
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
Russell Jones
2018-11-18 18:07:38 UTC
Reply
Permalink
Post by Michael
Post by Russell Jones
Post by Michael
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*
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
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
I think pip-3.6, etc, are always available.

I guess the Python 3 port file (python3.6, etc, are sub-ports, IIRC)
can't tell if a python3 is already installed, so it doesn't try to guess
for you which you want. Similarly pip/pip3, etc
Christopher Jones
2018-11-18 18:42:12 UTC
Reply
Permalink
Post by Michael
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
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.
No, not odd at all.

What you showed is
Post by Michael
keybounceMBP:js-beautify michael$ port select --summary
Name Selected Options
==== ======== =======
pip none pip36 none
so pip36 and none are valid available options, but the one you had active at the time was none. i,e. nothing was selected, which is exactly what you found.
Post by Michael
(Equally odd -- installing python36 in the first place did not install a pip if it is part of the python system).
It was installed, as ‘pip-3.6’.

You have to manually decide to ‘port select’ it if you want to use that version as ‘pip’ or ‘pip3’.
Post by Michael
Side question: Why is there not just a "python3", why do we have to specifically select one of several versions?
Because macPorts offers various different 3.x versions, so gives use the ability to pick which they want by default themselves.

Chris

Loading...