Fri 15 February 2019 —Filed under notes; tags: mac

This is due to in fontawesome.sty, it referenced FontAwesome by its name, but my MacTeX didn’t install the font into system (This time I installed with homebrew cask.) Solution locate fontawesome.sty in system. I currently have a working MacTex 2014 installation and Homebrew installation on OS 10.10.3, and am about to install MacTex 2015. But I'm concerned about permission issues. Both packages install in.

Table of Contents

Mactex Brew
  • system settings
  • homebrew
  • python
    • python3
  • virtualbox and vagrant

Another installation of my personal notes for setting up a new (orcleanly installed) MacOS computer. The process changes just a bit witheach new OS version. I have made an attempt to record the steps inorder (for example, even entering commands is somewhat painful until Ihave iTerm with familiar keyboard settings).

Somewhat glossed over here are manual steps used to transfernon-public dotfiles, credentials, etc. Here's a partial list of filesand directories that I copied directly from my old laptop:

MacTex ( MacTeX installer,Latex ) Rmarkdown문서를 PDF로 내보내기 위해 RStudio는 MacTeX가 필요하다. (가능하면 Full version으로 설치, 약 3GB필요) ⇒ brew cask install mactex java ⇒ brew cask install caskroom/versions/java8 apache-ant.

Note that none of these steps require an Apple ID - I held off onsigning in until the very end just to see if it was possible.

system settings

turn off spelling autocorrect

unmap Control + left,right

I use Control plus the left and right arrow keys to move betweenwindows in emacs and tmux.

Turn on FileVault

I used a recovery key option rather than iCloud for my work machine, iCloud for personal

Developer tools

Pretty much the first thing that needs to happen. This can be donefrom the command line:

iTerm2

Update a few settings.

Preferences –> Profiles –> Keys and do these things:

  • select 'Left/right option key acts as': +Esc
  • + –> Keyboard shortcut 'OPT+<left arrow>': Send Escape sequence 'b'
  • + –> Keyboard shortcut 'OPT+<right arrow>': Send Escape sequence 'f'

Default appearance:

  • Preferences –> Profiles –> Colors –> Load Presets –> Light Background
  • Preferences –> Profiles –> Text –> Change Font –> 14 point

homebrew

White noise 2 download for mac. Homebrew no longer requires user-ownership of /usr/local, so thingsare pretty easy now:

homebrew API token

Apparently lots of requests to GutHub via homebrew can hit a rate limit. There's a higher limit if you create an API token. See https://gist.github.com/christopheranderton/8644743

Here's the url for the token creation dialog:

Make sure that all 'scopes' are unchecked. Once you generate the token, add to your shell profile:

Terminal applications

Many packages are installed later with additional elaboration or in asdependencies for other applications; here are some more or lessstandalone packages that I routinely install.

desktop applications

Homebrew installs desktop apps too!

Some of the above (eg, sizeup, dropbox, dash) require licenses andcredentials that must be installed interactively.

Brew

python

Mojave seems to ship with Python 2.7.10 and no python3, so let's usehomebrew to get recent versions of both.

I try to limit packages installed to the system to utilities that arevery frequently used outside of the context of a virtualenv.

Seehttps://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Homebrew-and-Python.md

dependencies

Run brew info python for required and optional dependencies

python2

python3

Note that 'python' corresponds to the python3 homebrew recipe.

A limited selection of packages - better to use virtualenvs!

scons

Note that scons wants to install man pages to /usr/local/man, which is owned by root. You'll need to do this first:

emacs

Install latest emacs binary from http://emacsformacosx.com/ Golf around! crack.

Brew

Emacs needs a few homebrew packages

Check out my .emacs.d and run setup scripts.

For elpy:

zsh

Install zsh with Homebrew

Change shell to zsh

Install my dotfiles (relevant only to me)

R

I had to give up on installing R with homebrew because it seemed toresult in an interpreter that always wanted to install packages fromsource. So I used the binary from https://cran.r-project.org/bin/macosx/

Some packages that I know I'll need:

Wow, this takes a long time!

Also:

postgresql

This installs multiple versions of postgres. You'll need to add thepath to the CLI for the version you want to use to your PATH, eg:

X11

install Xquartz

X11 key bindings so that the option key is used for Meta. Not sorelevant any more now that I rarely use emacs via X11 for remotesessions.

virtualbox and vagrant

The command to install virtualbox will prompt you to allow a kernelextension in system preferences.

After virtualbox is installed, launch the application, go topreferences, and change default machine folder to ~/VirtualBox

  • available vagrant images:

install an ubuntu16.04 VM

see https://app.vagrantup.com/ubuntu/boxes/xenial64

Comments

Please enable JavaScript to view the comments powered by Disqus.

There are (too) many guides out there about how to install Python on Mac OS X. So why another one? Cause i found most of the other ways to lead to long-term maintenance debt that is unnecessary and can easily be avoided. Also many of the other guides aren’t very easy to extend in “but i also need that library”-cases. So here I’ll briefly explain how to set-up a scientific python stack based on homebrew. The advantages are that this stack will never conflict with your system’s core and homebrew opens up a whole new world of easy to access unix tools via a simple brew install ...

This step-by-step installation guide to setup a scientific python environment has been tested on Mac OS X Mavericks 10.9 / Yosemite 10.10 / El Capitain 10.11 / Sierra 10.12. Red orchestra: ostfront 41-45 download for mac. It will probably also work in the following versions (if not, let me know in the comments).
An older version of this setup guide can be found here: Scientific Python on Mac OS X 10.8 with homebrew, main changes: rename of a tap + changes wrt. openblas as Accelerate was fixed in OS X 10.9

Needless to say: Make a backup (Timemachine)

First install homebrew.
Follow their instructions, then come back here.

If you don’t have a clean install, some of the following steps might need minor additional attention (like changing permissions chmod, chown, chgrp or overwriting existing files in the linking step with brew link --overwrite package_that_failed. In this case i can only recommend a backup again).

In general: execute the following commands one line at a time and read the outputs! If you read some warnings about “keg-only” that’s fine, it just means that brew won’t “hide” your system’s stuff behind the stuff it installed itself so it doesn’t cause problems… brewed stuff will still use it.

A word about brewed python: this is what you want!

It’s more up to date than the system python, it will come with pip and correctly install in the brew directories, working together well with brewed python libs that aren’t installable with plain pip. This also means that pip by default will work without sudo as all of homebrew, so if you ever run or have to run sudo pip .. because of missing permissions, then you’re doing it wrong! Also, don’t be afraid of multiple pythons on your system: you have them anyhow (python2 and python3) and it’s an advantage, as we’ll make sure that nothing poisons your system python and that you as a user & developer will use the brewed python:

Mactex

If this is not the case you’d probably end up not using brewed python. Please check your brew install with brew doctor, it will probably tell you that you should consider updating your paths in ~/.bashrc. You can either follow its directions or create a ~/.profile file like this one: ~/.profile. If you performed these steps, please close your terminal windows and open a new one for the changes to take effect. Test the above again.

Even if the above check worked, run the following anyhow and read through its output (no output is good):

Brew Install Mactex

Pay special attention if this tells you to install XQuartz, and if it does, install it! You’ll need it anyhow…

Brew Mactex Path

Now after these preparations, let’s really start installing stuff… below you’ll mostly find one package / lib per line. For each of them and for their possible options: they’re a recommendation that might save you some trouble, so i’d recommend to install all of them as i write here, even if specifying some of the options will compile brew packages from source and take a bit longer…

Have fun 😉

Updating

OK, let’s say it’s been a while since you installed things with this guide and you now want to update all the installed libs. To do this you should first upgrade everything installed with brew like this:

Afterwards for upgrading pip packages (globally or in a virtualenv) you can just run

to get a list of outdated packages and then manually update them with:

If you want a tiny bit more comfort you can use the pip-review package to do this interactively:

Once installed you should be able to run the following either in a virtualenv or globally for your whole system:

It will check your installed packages for new versions and give you a list of outdated packages. I’d recommend to run it with the -i option to interactively install the upgrades.

A word of warning about the brewed packages: If i recommended to install a package with brew above that’s usually for a good reason like the pip version not working properly. If you’re a bit more advanced, you can try to upgrade them with pip, but i’d recommend to properly unlink them with brew unlink <package> before, as some pip packages might run into problems otherwise. If you find the pip package works like a charm then, please let me know in the comments below so i can update this guide. In general i prefer the pip packages as they’re more up to date, work in virtual environments and can then easily be updated with pip-review.

Mac Brew Mactex

As always: If you liked this, think something is missing or wrong leave a comment.

Updates to this guide:

Mactex Brewery

2014-03-02: include checking of $PATH for Mike
2015-03-17: enhanced many explanations, provided some useful options for packages, general workover
2015-04-15: included comment about installing mactex via cask if not there already, thanks to William
2015-06-05: Pillow via pip and Updating section
2015-11-01: pip-review (was detached from pip-tools) + alternative
2016-02-15: hash -r python (invalidate bash python bin lookup cache)
2016-12-21: updates for sierra, brew upgrade, python3 and some more comments
2017-03-30: updated pyqt’s package name to pyqt5