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

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 :: strptime python decimal seconds 
Python :: check package version jupyter python 
Python :: send image discord.py 
Python :: split filename and extension python 
Python :: pandas read csv without header 
Python :: python roll dice 100 times 
Python :: python printing date 
Python :: tensorflow plot model 
Python :: pandas df remove index 
Python :: python flat list from list of list 
Python :: python plot two lines on same graph 
Python :: rename the console python 
Python :: python - save file 
Python :: print whole dataframe python 
Python :: print key of dictionary python 
Python :: how to accept input as list pyhton 
Python :: opencv flip image 
Python :: django import models 
Python :: f string float format 
Python :: numpy replicate array 
Python :: python mouse click 
Python :: change axis and axis label color matplotlib 
Python :: python get domain from url 
Python :: could not find runder jupyter notebook 
Python :: make a message appear after specified Time python 
Python :: worksheet merge&center cells python 
Python :: simple flask app 
Python :: dashes seaborn 
Python :: par o inpar python 
Python :: anaconda create environment python version 
ADD CONTENT
Topic
Content
Source link
Name
1+1 =