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 :: multiplication table python 
Python :: taille du liste python 
Python :: django orm group by month and year 
Python :: smtp python set subject 
Python :: how to kill a script if error is hit python 
Python :: df.fillna(-999,inplace=True) 
Python :: connect mongodb with python 
Python :: np reshape 
Python :: react-native-dropdown-picker 
Python :: lambda function dataframe 
Python :: python sleep timer 
Python :: Selecting subset of columns with pandas 
Python :: how to download from url in python 
Python :: how to filter queryset with foreign key in django 
Python :: plot neural network keras 
Python :: Filter Pandas rows by specific string elements 
Python :: change the side of the axis plt python 
Python :: scrapy shell 
Python :: Python Add a string in a certain position 
Python :: installing required libraries in conda environment 
Python :: check for string in list py 
Python :: how to hide ticks marks in matplotlib 
Python :: python scapy get mac of remote device 
Python :: python .findall 
Python :: pip install pandas Getting requirements to build wheel 
Python :: get all different element of both list python 
Python :: swap two columns python 
Python :: how to find index of maximum value in dataframe in python 
Python :: python round without math 
Python :: pandas apply 
ADD CONTENT
Topic
Content
Source link
Name
8+8 =