mgomesborges / Mac Dev Setup
Programming Languages
Projects that are alternatives of or similar to Mac Dev Setup
macOS Development Setup
A macOS development environment setup guide and command-line tool.
Command Line Tools (mandatory)
The Command Line Tools Package is a small self-contained package available for download separately from Xcode and that allows you to do command line development in macOS.
Install Command Line Tools
-
Paste that in the terminal prompt:
xcode-select --install
-
A software update popup window will appear. Click
Install
, then agree to the Terms of Service when requested. -
The Command Line Tools is installed at:
/Library/Developer/CommandLineTools/
Xcode (optional)
Xcode is Apple's integrated development environment (IDE) for Swift, Objective-C, C, and C++. It also supports Java, AppleScript, Python, Ruby, and ResEdit (Rez).
Install Xcode
Download and install Xcode from the App Store or from Apple's website
⚠️ Xcode takes over 13 GB of disk space. Its installation is not mandatory.
Homebrew (mandatory)
Homebrew is the missing package manager for macOS.
Install Homebrewv
Open the terminal and run the following script:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Git (mandatory)
Git is a free and open source distributed version control system.
Install and set up git
-
Paste that in the terminal prompt:
bash <(curl -fsSL raw.githubusercontent.com/mgomesborges/mac-dev-setup/master/install) git
-
Or follow the Git set-up guide.
Terminal
With macOS Catalina - October 2019, Apple is now using Zsh as the default shell. However, you can quickly switch back to Bash if you prefer.
Check out how to select your shell and set up your terminal theme:
Python
Python is a programming language that lets you work quickly and integrate systems more effectively.
Install Pyenv and Python 3.7.6
Pyenv lets you easily switch between multiple versions of Python.
-
Paste that in the terminal prompt:
bash <(curl -fsSL raw.githubusercontent.com/mgomesborges/mac-dev-setup/master/install) python376
-
Or follow the Python set-up guide.
⚠️ It is recommended to close and reopen the terminal to apply the configuration!
Python for Data Science
Python Packages
- TensorFlow, Keras, numpy, pandas
- scipy, scikit-learn, scikit-image, sk-video
- Matplotlib, pillow
- Jupyter lab & extensions
Install Python Data Science packages
-
Paste that in the terminal prompt:
bash <(curl -fsSL raw.githubusercontent.com/mgomesborges/mac-dev-setup/master/install) pypackages
-
Or follow the Python Data Science set-up guide.
Visual Studio Code - VS Code
Visual Studio Code is a lightweight but powerful source code editor.
Check out the VS Code set-up guide.
Using VS Code with particular technologies
Microsoft created a collection of recipes for using VS Code with particular technologies (mostly Web).
Make sure to visit it at Microsoft/vscode-recipes.
LaTeX - MacTeX (optional)
MacTeX is an install package which installs everything needed to run TeX on Mac OS X.
Install LaTeX
-
Install Ghostscript
brew install ghostscript
-
Download MacTeX 2020 from https://tug.org/mactex/mactex-download.html
-
Double click on the downloaded file to install
-
Several pages of information will be displayed
-
One of the last is shown below. Click on the
Customise
button -
Deselect the packages
Ghostscript 9.50
,Ghostscript Dynamic Library
andGUI Applications
, then click onInstall
Qt
Qt is a cross-platform application development framework for desktop, embedded and mobile using C++ or Python. Supported Platforms include Linux, OS X, Windows, VxWorks, QNX, Android, iOS, BlackBerry, Sailfish OS and others.
Install Qt
- Download and run the Qt online Installer
- Click
Next
on the Welcome to the Qt Online installer window - Click
Skip
on the Qt Account window - Accept the Qt Open Source Usage Obligations, and click
Continue
- Click
Continue
no the Setup - Qt window - The installer will complain that Xcode is not installed, just click
OK
- On the Qt Creator User Experience Development window, make your choice and click
Continue
- Click
Continue
on the Installation Folder window - Select the latest Qt version prebuilt components:
- [x]
Qt 5.15.0
/macOS
- [x]
Developer and Designer Tools
/Qt Installer Framework 3.2
- [x]
- Then click
Next
andInstall
Add Qt Creator into Applications
Paste that in the terminal prompt:
# Symbolic link
ln -s "${HOME}/Qt/Qt Creator.app" "/Applications"
FFmpeg
FFmpeg is a complete, cross-platform solution to record, convert and stream audio and video.
Install FFmpeg
Run that in the terminal:
# Leave Python virtual environment
deactivate
# Install FFmpeg with all modules
brew install ffmpeg
OpenCV
OpenCV (Open Source Computer Vision Library) is an open source computer vision and machine learning software library.
UPGRADE OpenCV
-
Uninstall old version:
CV_DIRS=( "/usr/local/share" "/usr/local/include" "/usr/local/lib" "/usr/local/bin" ) sudo -v for cv_dir in ${CV_DIRS[@]}; do sudo find ${cv_dir} -name "*opencv*" -exec rm -rf {} \; done
-
Remove installation directories:
rm -rf "${HOME}/opencv" rm -rf "${HOME}/opencv_contrib"
-
Install OpenCV following the instructions below!
Install OpenCV with Python and Qt support
⚠️ To keep compatibility, use Python 3.7.6.
-
Choose the version. Paste that in the terminal prompt:
# export OPENCV_VERSION="4.X.X" # export OPENCV_VERSION="3.4.X" export OPENCV_VERSION="4.5.1"
-
Easy install using mac-dev-setup:
bash <(curl -fsSL raw.githubusercontent.com/mgomesborges/mac-dev-setup/master/install) opencv
-
Or check out the OpenCV set-up guide with Qt support.
Contributing
All contributions are welcome! There are many ways in which you can participate in the project, for example:
- Submit bugs and feature requests
- Review the documentation and make pull requests for anything from typos to new content
If you are interested in fixing issues and contributing directly to the code base, please read our Contribution Guide.
Feedback
Author
License
The source code is licensed under the MIT license.
The content of this project itself is licensed under the Creative Commons Attribution 4.0 International.