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

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 :: pandas read excel certain columns 
Python :: cv2 read rgb image 
Python :: python unittest discover 
Python :: how to make text to speech in python 
Python :: how to get the max of a list in python 
Python :: numpy randn with a shape of another array 
Python :: get UTC time for IST time python 
Python :: higlight words in python 
Python :: plotly color specific color 
Python :: list in list python 
Python :: how to replace an element of a list using list comprehension 
Python :: BURGERS2 solution 
Python :: multiple arguments with multiprocessing python 
Python :: find commonalities in dictionary python 
Python :: random.choices in python 
Python :: how to combine strings python 
Python :: maximum element in dataframe row 
Python :: dict keys to list in python 
Python :: split pdf python 
Python :: postman authorization 
Python :: selenium get h1 text python 
Python :: pandas add thousands separator 
Python :: python list contain list 
Python :: serialization in django 
Python :: change the number in 3rd line to get factorial for the number you want. Ex: num = 30 
Python :: how to append string to another string in python 
Python :: sqlalchemy convert row to dict 
Python :: sort dictionary by key 
Python :: how to make a random int in python 
Python :: pandas correlation matrix between one column and all others 
ADD CONTENT
Topic
Content
Source link
Name
5+4 =