Mod:Hunt Research Group/MacPorts

From ChemWiki
Revision as of 16:45, 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 --set python3 python37
port select --set python2 python27
port select --set python python37 or which ever version you want
  • problems
the mac has a preinstalled version of python in /user/local/bin
python.org installs in /Library/Frameworks/Python.framework/Versions/3.5/bin and so on
macports installs in /opt/local/bin
to find out which version is being used type "which python"
to find out the version of python used "python -V"
to ensure the macports version is used in your $PATH make sure /opt/local occurs before /user/local
sometimes other initiating files add things to your path, so even with the path variable below if I echo $PATH, /usr/local comes up first
switch your script to PATH=/Users/tricia/bin:$PATH etc

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:

[tricia@dyn1243-210]/Users/tricia $ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Library/TeX/texbin:/Users/tricia/bin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/Applications/anaconda/bin:/Users/tricia/bin/repESP/scripts::/Users/tricia/bin/amber16/bin:/Applications/gauopen:/Applications/g16/bsd:/Applications/g16
[tricia@dyn1243-210]/Users/tricia $