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 :: python number and name of weekday 
Python :: string split in pandas 
Python :: cool things to do with python 
Python :: fastest clicker python 
Python :: how to use xpath with beautifulsoup 
Python :: json filter python 
Python :: loop append to list python 
Python :: normal distribution in python 
Python :: python download youtube video 
Python :: numpy random.permutation 
Python :: python datetime day of year 
Python :: create alinked list inb pyhton 
Python :: OS Error: Connection refused, errno = 111, address = 127.0.0.1, port = 43350 
Python :: how to find the number of times a number appears in python 
Python :: pandas series quantile 
Python :: Make a Basic Face Detection Algorithm in Python Using OpenCV and Haar Cascades 
Python :: python turtle write 
Python :: random sample with weights python 
Python :: threading python 
Python :: logistic regression algorithm in python 
Python :: python reverse a string 
Python :: python exceptions 
Python :: python convert string datetime into datetime 
Python :: remove spaces in string python 
Python :: pandas read from txt separtion 
Python :: minecraft python code 
Python :: regex findall 
Python :: mediafileupload python example 
Python :: python mahalanobis distance 
Python :: how to get date in numbers using python 
ADD CONTENT
Topic
Content
Source link
Name
8+7 =