I have a MacBook Pro 13` inch (without touch bar) and it is running mac os sierra. I have installed Xcode, command line tools and homebrew. Now I want to install python 3 and make it a default interpreter when calling it from the terminal. I have found this guide http://docs.python-guide.org/en/latest/starting/install3/osx/ and I get confused when they say I should add the path to the ~./profile but I don't know where to find the file. Can somebody help with step by step guide on how to create it if it not there?
Thanks
The . profile file is present in your home ($HOME) directory and lets you customize your individual working environment. Because the . profile file is hidden, use the ls -a command to list it.
Edit a configuration profileSelect the device, user, or group, then click the Edit button next to the configuration profile you want to edit, then use the payload editing panes to make changes. Click Save.
apple. Terminal. savedState, and then remove the word "copy" from the end. Open Terminal, and you should see all of your profiles.
On Mac, zsh
is the default shell. You can check this by running
echo $SHELL
If so, you can check for ~/.zshrc
if not you can create one and add required commands, alias which need to run during the terminal startup.
Then you can run
source ~/.zshrc
This will be executed every time the terminal is opened.
I felt to add something here that ate a lot of my time when I had a similar issue.
Many a times the .profile or the .bash_profile (in case of bash shell) is not present. This is typically when you have freshly installed the OS or when you're on a new machine. This gets confusing as one may think if the installation wasn't correct etc. Nothing to worry about. If you don't find these files then simply create it new using vi or whatever means (GUI) and you're good to go. Having a shell doesn't mean you have these files too and you have to create it yourself if you're the first one to use it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With