Problems when using python3 to write webpages
Preparation
Environment: Windows 10
Language: python3
Packages: flask, dash, pandas, etc.
This document records problems I encountered when writing webpages. Most are stupid. But I am not smart, so I write them down.
Python3.6 installation failed
When a newer Python is already installed, the installation will fail. Check the version of Python, Anaconda, … Make sure unnecessary versions are uninstalled.
Add both Python2 and Python3 to Environment Variables
Just copy one python.exe and paste it in the folder. Change the copied name into ‘python3.exe’(or ‘python2.exe’).
Right Click ‘This PC’ in File Explorer and click ‘Properties’.
Advanced System Setting > Advanced > Environment Variables > System Variables > Edit the ‘path’ entry and add both python2 and python3 paths.
Try ‘python --version’, ‘python3 --version’ or ‘python2 --version’ in command prompt.
pip? No it is pip3.
Open Command Prompt and type command.
Python3 cannot use following command to install package.
(@packagaName can be ‘numpy’, ‘pandas’, ‘flask’, etc.)
pip install @packageName
For I’ve uninstalled python2, it will throw out an erro