Mod:Hunt Research Group/MacPorts

From ChemWiki
Revision as of 16:18, 31 October 2018 by Phunt (Talk | contribs) (MacPorts)

Jump to: navigation, search

MacPorts

  • installing MacPorts
  • find installation information here link
  • find general information here link
  • download and follow the instructions
  • macport installs in /opt/local so add to your path "export PATH=/opt/local/bin:/opt/local/sbin:$PATH"
  • after a major OS upgrade you will need to install a new MacPorts
  • using MacPorts basic commands
  • you will need to run all commands as sudo
  • general commands
port version
sudo port selfupdate
port installed
port outdated
port upgrade
port uninstall code_name
port activate code_name
  • search for particular codes, in this case for python versions, generally or installed on this machine
port search --name --line --glob 'python*'
port installed 'python*'
port select list python
port select python3 python37
  • problems
the mac has a preinstalled version of python in /user/local/bin
macports installs in /opt/local/bin
to find out which version is being used type "which python"
to ensure the macports version is used in your $PATH make sure /opt/local occurs before /user/local

for example

PATH=$PATH:/Users/tricia/bin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/Applications/anaconda/bin:/Library/Frameworks/Python.framework/Versions/3.5/bin:/Users/tricia/bin/repESP/scripts: