Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

change default python version mac

#install or update brew
$ brew install pyenv
#install
$ pyenv install 3.7.3
#make default
$ pyenv global 3.7.3
# and verify
$ pyenv version
3.7.3 (set by /Users/mbbroberg/.pyenv/version)
$ echo -e 'if command -v pyenv 1>/dev/null 2>&1; then
  eval "$(pyenv init -)"
fi' >> ~/.bash_profile
#reset the current shell
$ exec $0 
$ which python
#/Users/mbbroberg/.pyenv/shims/python
$ python -V
$ pip -V
#pip 19.0.3 from /Users/mbbroberg/.pyenv/versions/3.7.3/lib/python3.7/site-packages/pip (python 3.7)
Comment

python3 as default python path macos

ln -sf /usr/local/bin/python3 /usr/local/bin/python
Comment

use python3 as default mac

ln -s -f /usr/local/bin/python3.7 /usr/local/bin/python
Comment

set python3 as default mac

# it is said not to do but I used it anyway, because of the conveniency
$ echo "alias python=/usr/local/bin/python3.7" >> ~/.zshrc 
Comment

change python3 as default for mac

unlink /usr/local/bin/python
ln -s /usr/local/bin/python3.3 /usr/local/bin/python
Comment

how to make python 3 default on mac

ln -s -f /usr/local/bin/python3.7 /usr/local/bin/python
Comment

set python 3 as default mac

[ -e ~/.profile ] && . ~/.profile
Comment

PREVIOUS NEXT
Code Example
Python :: python array to string 
Python :: .encode python 
Python :: python send http request 
Python :: df groupby loop 
Python :: pyhton mahalanobis distance 
Python :: python get last element of iterator 
Python :: python assert 
Python :: how to check if any item in list is in anoter list 
Python :: _getfullpathname: path should be string, bytes or os.PathLike, not list 
Python :: plt.legend( 
Python :: spyder - comment banch of codee 
Python :: length of pandas dataframe 
Python :: matplotlib custom legend 
Python :: compress tarfile python 
Python :: assign multiple variables in python 
Python :: pandas dataframe to parquet s3 
Python :: check if path exists python 
Python :: iso date convert in python 
Python :: square all elements in list python 
Python :: elon musk wikipedia 
Python :: formatting in python 
Python :: reportlab page size a4 
Python :: Clear All the Chat in Discord Channel With Bot Python COde 
Python :: file searching in python 
Python :: change matplotlib fontsize 
Python :: how to start an exe file in python 
Python :: decision tree algorithm python 
Python :: streamlit change tab name 
Python :: change django time zone 
Python :: Converting objects into integers 
ADD CONTENT
Topic
Content
Source link
Name
9+2 =