12/28/2023 0 Comments Install numpy for mac$ cd /System/Library/Frameworks/amework/Versions This symlink controls the version of Python that runs when a user types python in Terminal. These directions should have appeared at the end of your brew installation, but in case you missed them, here they are (These instructions assume Python 2.7.6 – note the version since this affects what you will type into Terminal): $ brew install python Update macOS’s Python symlink to point to Homebrew’s Python. $ brew install gcc Install Homebrew’s Python. Without this, installation has failed with a vague gfortran error. This step, overlooked in the other blogs I’ve seen, has been required in the past for successfully installing SciPy and PyMC (newer Homebrew formulae may have fixed this problem). Continue to follow brew doctor‘s instructions until it tells you that “Your system is ready to brew.” Install Homebrew’s gcc. # note the version (10.10) and modify accordingly. $ sudo ln -s XcodeDefault.xctoolchain OSX10.10.xctoolchain $ cd /Applications/Xcode.app/Contents/Developer/Toolchains/ If I’m guessing the error correctly, here is the solution that brew doctor will suggest (assuming OS X 10.10 – note the version since this affects what you will type into Terminal): brew doctor usually complains about Xcode. $ ruby -e "$(curl -fsSL )" Fix any problems that Homebrew detects.įollow $ brew doctor‘s instructions. Because the packages are centralized in the Cellar, they are easily updated and/or removed. Homebrew is a great package manager for macOS that installs everything in /usr/local/binand does not require sudo.It then creates symlinks to the expected locations so that the various tools can find one another. Edit /etc/pathsusing vi or your favorite text editor. Close your Terminal window and open a new Terminal window for this change to take effect. If they don’t, then you need to change this order. Make sure that /usr/local/bin occurs before /usr/bin. $ xcode-select -install Check the systemwide PATH variable. The quickest way to do this is from Terminal: Once you have Xcode installed, you need to install the command line tools for the gcc compiler to work. Xcode is a dependency for Homebrew, which uses Xcode’s gcc compiler to compile everything from source. Download Xcode from the App store and install the command line tools. For each package, use $ brew update and $ brew upgrade to download new packages. Use my directions to keep you on track as you test each package after each reinstallation, as I have demonstrated in my instructions, so that if there are problems, you know where they are. If you decide that you don’t want to start with a clean install of macOS, then go through these instructions anyway. Migration Assistant takes care of restoring ordinary documents, which Apple does well, yet it provides a relatively blank slate under the hood to freshly install tools. Erase your working hard drive, install macOS, then have Migration Assistant import user accounts and applications from the backup ( but leave the Other Files & Folders box unchecked). Time Machine works spectacularly well for this purpose, or you can install onto a new hard drive or carbon copy your old drive. If you decide to do a clean installation, first make sure that you have a backup. But, as macOS and Homebrew have matured, I’m noticing less of a need to do this. I’ve ended up with multiple MySQL servers and multiple Apache servers. The dirty upgrade works great if you’re an everyday user who stays on the UI level, but in the distant past it made a terrific mess of my tools installed under the hood. Consider starting with a clean install of macOS. I haven’t been going back and re-testing these instructions on older macOS releases, so your mileage might vary if you do this. Over the years this post has been edited and updated to keep up with new versions, and new Homebrew formulae have been added and improved. I’ve tested these instruction on macOS 10.8 Mountain Lion, 10.9 Mavericks, 10.10 Yosemite, and 10.11 El Capitan when they were reasonably current. These tools used to break with each new version of macOS, although as it has matured, the disruptions with each new release have become less. For my research, I use Python, NumPy, SciPy, matplotlib, PyMC, and Basemap/geos, among other modules.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |