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 :: module not found not module name channels in python 
Python :: convert string list to float 
Python :: python find smallest element in dictionary 
Python :: jinja2 datetime format 
Python :: opencv draw a point 
Python :: how to read video in opencv python 
Python :: python how to save a Seaborn plot into a file 
Python :: pandas remove char from column 
Python :: python pip graphviz 
Python :: pytube urllib.error.HTTPError: HTTP Error 410: Gone 
Python :: invert dictionary python 
Python :: create boto3 s3 client with credentials 
Python :: get_object_or_404 
Python :: inverse matrix python 
Python :: how to check if an application is open in python 
Python :: folium anaconda 
Python :: filter dataframe columns vy a list of columns 
Python :: pandas dataframe set datetime index 
Python :: python how move file to directory 
Python :: pandas empty dataframe with column names 
Python :: how to wait in python 
Python :: numpy read image 
Python :: python pyautogui how to change the screenshot location 
Python :: timestamp to date python 
Python :: display Max rows in a pandas dataframe 
Python :: python read file delete first line 
Python :: python pil image flip 
Python :: concat dataFrame without index reset 
Python :: SSL: CERTIFICATE_VERIFY_FAILED with Python3 
Python :: how to install wxpython 
ADD CONTENT
Topic
Content
Source link
Name
5+1 =