Primary Installation Steps
Xcode tools:
xcode-select —install
Above commands should start the reinstallation process. In case you get below messege -
xcode-select: error; command line tools are already installed, use "Software Updates" to install updates
Then you need to work around else you'll face issue running lot of commandline code.
Quick Fix
Step 1
Run
sudo xcode-select --reset
If this does nothing then follow next steps which works for Big Sur 11.1
Step 2 [This should be enough]
Run
xcode-select --print-path
then remove the path by
sudo rm -r -f /Library/Developer/CommandLineTools
Then finally,
xcode-selct --install
should get you below picture -
For more info on xcode installation refer this source
Homebrew:
HomeBrew is an Open-Source software pakage manager. It is Very handy and essential for mac terminal to install\uninstall open source softwares
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
basic command for installing softwares via homebrew package manager:
brew install [package_name]
brew uninstall [package_name]
for uninstalling purpose`echo 'export PATH="/usr/local/sbin:$PATH"' >> ~/.zshrc
adding brew to environment pathbrew update
for updating brew packages to latest versionbrew info [package_name]
information on the pakages of your interestbrew list
orbrew list | grep [pakage_name]
for listing/finding available pakages underbrew
NOTE if HomeBrew installation failed try this -
rm -rf /usr/local/bin/brew
rm -rf /usr/local/share/doc/homebrew
rm -rf /usr/local/share/man/man1/brew.1
rm -rf /usr/local/share/zsh/site-functions/_brew
rm -rf /usr/local/etc/bash_completion.d/brew
rm -rf /usr/local/Homebrew
CASK:
CASK brew cask
is an extension of brew
install GUI based application.
Basic steps for CASK usages -
brew install cask
brew search --casks
this for searching apps under cask`brew search [package_name]
brew cask update
for updating packagesbrew cask help
for checking advance option for cask
PYTHON
pyenv
is a Open-Source Package Manager for python version control in a single system. Setting up python using pyenv
in very easy and effective. This will not imapct system python version. You can find the project here on GitHub.
Basic installation steps are -
*brew install pyenv
pyenv
should print current version1.2.20
(as of today)pyenv install --list
orpyenv install -list | grep -ow 3.8.5
just to check if latest version of python release is available withpyenv
pyenv install [version_name]
e.g.3.8.5
- Finally check available version(s) with
pyenv
bypyenv versions
To know more about pyenv
please refer here
Next step after installing python with pyenv
is to install another popular package manager pipenv
. It is a package manager for handling python libraries
Basic installation can be done by -
brew install pipenv
pipenv -version
should return latest version2020.8.13
. This should also install lastestpython3
to mac by default andpip3
To know more please refer here
Adding pyenv
into the $PATH
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zshrc[.bash_profile]
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zshrc[.bash_profile]
echo 'eval "$(pyenv init -)"' >> ~/.zshrc[.bash_profile]
Quick Intro from Real Python Other Utilities
If you are a Linux user, you must have used htop
for inspecting CPU usages. Well you can use the same in Mac as well.
to install htop
- brew install htop
run
by sudo htop
as this application will need to access hardware info from the kernals
Another must have utility is SPEEDTEST
. I use it all the time via browser. But CLI
application is much cooler.
to install speedtest
- brew install speedtest-cli
run
by speedtest-cli
Software Updates checking via commandline -
softwareupdate
Updating App Store Application from command line -
brew install mas
- Type
mas
to check other command options available withmas
- https://apple.stackexchange.com/questions/125468/what-is-the-difference-between-brew-and-brew-cask
- https://www.youtube.com/watch?v=Ym2pxzWpTNw&ab_channel=SnazzyLabs
- https://www.chrisjmendez.com/2017/08/03/installing-multiple-versions-of-python-on-your-mac-using-homebrew/
- https://www.chrisjmendez.com/2016/01/10/installing-homebrew-on-mac-os-x/
- https://realpython.com/intro-to-pyenv/#using-pyenv-to-install-python
- https://pipenv-fork.readthedocs.io/en/latest/
- https://www.applegazette.com/mac/update-mac-apps-using-terminal/