Quick Tip: How to set Python default version to 3.x on macOS?
Symlink Python
Now let’s create the right set of symlinks for Python 3.X so that it becomes the default python command in your macOS. Run the following command:
ls -l /usr/local/bin/python*
expected output:
lookang@Opens-MacBook-Pro 20210707 % ls -l /usr/local/bin/python*
lrwxr-xr-x 1 lookang admin 22 Mar 22 08:04 /usr/local/bin/python -> /usr/local/bin/python3
lrwxr-xr-x 1 lookang admin 38 May 5 2022 /usr/local/bin/python-build -> ../Cellar/pyenv/2.2.5/bin/python-build
lrwxr-xr-x 1 root wheel 75 Jun 17 2021 /usr/local/bin/python-config -> ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/python-config
lrwxr-xr-x 1 root wheel 69 Jun 17 2021 /usr/local/bin/python2 -> ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/python2
lrwxr-xr-x 1 root wheel 76 Jun 17 2021 /usr/local/bin/python2-config -> ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/python2-config
lrwxr-xr-x 1 root wheel 71 Jun 17 2021 /usr/local/bin/python2.7 -> ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7
lrwxr-xr-x 1 root wheel 78 Jun 17 2021 /usr/local/bin/python2.7-config -> ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7-config
lrwxr-xr-x 1 root wheel 69 Jul 15 2021 /usr/local/bin/python3 -> ../../../Library/Frameworks/Python.framework/Versions/3.9/bin/python3
lrwxr-xr-x 1 root wheel 76 Jul 15 2021 /usr/local/bin/python3-config -> ../../../Library/Frameworks/Python.framework/Versions/3.9/bin/python3-config
lrwxr-xr-x 1 root wheel 71 Jul 15 2021 /usr/local/bin/python3.9 -> ../../../Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9
lrwxr-xr-x 1 root wheel 78 Jul 15 2021 /usr/local/bin/python3.9-config -> ../../../Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9-config
lrwxr-xr-x 1 root wheel 69 Jun 17 2021 /usr/local/bin/pythonw -> ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/pythonw
lrwxr-xr-x 1 root wheel 70 Jun 17 2021 /usr/local/bin/pythonw2 -> ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/pythonw2
lrwxr-xr-x 1 root wheel 72 Jun 17 2021 /usr/local/bin/pythonw2.7 -> ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/pythonw2.7
Take a look at the first line. It shows default python being symlinked to the python3. If you don’t see that in the output, then we can be sure to set it as the default python symlink run the following:
ln -s -f /usr/local/bin/python3 /usr/local/bin/python
And we are all set.
Last login: Wed Mar 22 08:01:34 on ttys000
lookang@Opens-MacBook-Pro ~ % exec $SHELL -l
lookang@Opens-MacBook-Pro ~ % which python
/usr/local/bin/python
lookang@Opens-MacBook-Pro ~ % python --version
Python 3.9.6
lookang@Opens-MacBook-Pro ~ % tgaui
zsh: command not found: tgaui
lookang@Opens-MacBook-Pro ~ % tagui
tagui v6.113: use following options and this syntax to run - ./tagui flow_filename option(s)
tagui live launch TagUI live mode enabled with visual automation for interactive development
tagui update download and update to latest TagUI version (please backup your version beforehand)
input(s) add your own parameter(s) to be used in your automation flow as variables p1 to p8
data.csv specify a csv file to be used as the datatable for batch automation of many records
-deploy -d generate .command file which can be double-clicked to run workflow with specific options
-headless -h run on invisible Chrome web browser instead of visible as default (first install Chrome)
-nobrowser -n run without any web browser, for example to perform automation only with visual automation
-report -r track run result in tagui/src/tagui_report.csv and save html log of automation execution
-turbo -t run automation at 10X the speed of normal human user (read the caveats in usage guide!)
-quiet -q run without output except for explicit output (echo, show, check steps and errors etc)
-edge -e run TagUI using Microsoft Edge instead of Google Chrome (can be used with -headless)
lookang@Opens-MacBook-Pro ~ % cd /Users/lookang/Desktop/tagui/flows/lookang/20210707/
lookang@Opens-MacBook-Pro 20210707 % tagui loginsls5mims.tag
PHP Deprecated: Creation of dynamic property WebSocket\Client::$options is deprecated in /Users/lookang/Desktop/tagui/src/ws/Client.php on line 25
This is an attempt to fix the TagUI issue discueesed here
No comments:
Post a Comment