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 :: how to get data from json web api in python 
Python :: how do i print when my bot is ready in discord.py 
Python :: load ui file pyqt5 
Python :: rotate matrix 90 degrees clockwise python 
Python :: float number field django models 
Python :: pandas set font size plot 
Python :: python get args 
Python :: Import "decouple" could not be resolved Pylance 
Python :: python tkinter clear textbox 
Python :: check if any values overlap in numpy array 
Python :: mp4 to wav python 
Python :: python method to filter vowels in a string 
Python :: python merge strings in columns 
Python :: python index of max value in list 
Python :: how to add numbers in python using for loop 
Python :: extract numbers from sklearn classification_report 
Python :: random int in python 3 
Python :: how to check sklearn version 
Python :: python f string decimal places 
Python :: scikit learn ridge classifier 
Python :: pandas not is in 
Python :: skip header in csv python 
Python :: python write yaml 
Python :: python get num classes from label encoder 
Python :: how to say someting in python 
Python :: arweave python 
Python :: flask app starter 
Python :: python markdown indent 
Python :: rezing images of entire dataset in python 
Python :: pandas filter and change value 
ADD CONTENT
Topic
Content
Source link
Name
7+9 =