Memorise

Archive for March 31st, 2021

Python3 as a default python version on MacOS?

By default MacOS ships with Python-2.-. But, I guess most of us have long back started to work with Python-3 and it is very irritating to run python3 every time instead of python in terminal. Here is how to do this. Open the terminal (bash or zsh) whatever shell you are using. Install python-3 using Homebrew (https://brew.sh). Look where […]

WTForms Install email validator for email validation support

PROBLEM bash-3.2$ export FLASK_APP=flaskblog.pybash-3.2$ flask runTraceback (most recent call last):File “/Library/Frameworks/Python.framework/Versions/3.9/bin/flask”, line 8, insys.exit(main())File “/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/flask/cli.py”, line 967, in main cli.main(args=sys.argv[1:], prog_name=”python -m flask” if as_module else None)File “/Users/shiraj/Documents/GitHub/Python/Flask_blog-complete/forms.py”, line 10, in RegistrationForm validators=[DataRequired(), Email()])File “/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/wtforms/validators.py”, line 332, in initraise Exception(“Install ’email_validator’ for email validation support.”)Exception: Install ’email_validator’ for email validation support. SOLUTIONS bash-3.2$ pip install […]