I was wondering how you can append a variant to a port if you have already installed the port. For example I installed the 'vim' port and would like to go back and add the python25 variant. Do I need to delete vim and reinstall it? This is just an example, I would really like to know the process to do this for any port.
Thanks for any help, Greg
Only one variant of a MacPorts
port can be active at any one time. However, in MacPorts
terminology, multiple variants and/or versions of a port can be installed
simultaneously. Of those, at most one is active
, any others are inactive
. If you need to occasionally alternate between variants, you can activate a specific variant as needed. That will also automatically deactivate any conflicting active port. For example, here's a hypothetical vim
example (not fully tested!):
$ sudo port install vim +python26
$ sudo port clean vim
$ sudo port install vim +python31
$ sudo port echo installed |grep vim
vim @7.3.21_0+python26
vim @7.3.21_0+python31
$ sudo port activate vim @7.3.21_0+python26
# ... edit with Python 2
# ...
$ sudo port activate vim @7.3.21_0+python31
# ... edit with Python 3
# ...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With