Because I accidentally installed one python2 Of 64 Bit and python3 Of 32 position , As a result, some programs cannot run , But I can only uninstall python3 Of 32 position , Then delete the folder , download python3 Of 64 position , reinstall , Then I met python2 and python3 The problem of coexistence , Comb it over again .
1、 download
I suggest you download one 64 Bit , although 32 Bit wider , But many high performance requirements 64 position
Download and install
Recommended installation C:\
2、 If the installation process is checked add path to Variable , Then don't move , without , You need to add Path
3、 modify python Edit the name
python2 Inside python.exe Change to python2.exe pythonw.exe Change to pythonw2.exe
python3 Inside python.exe Change to python3.exe pythonw.exe Change to pythonw3.exe
Depending on personal preference , Main use 2 You can omit numbers 2, Main use 3 You can omit numbers 3
4、 Set up pip
python2 -m pip install --upgrade pip
python3 -m pip install --upgrade pip
pip2 -V perhaps pip3 -V You can view the version
5、 Environmental restoration
Before that pip freeze >requirements.txt export
then
pip3 install -r requirements.txt that will do
pip install [package-name] # The installation name is [package-name] My bag pip install [package-name]==X.X # The installation name is [package-name] And specify the version X.X pip install [package-name] --proxy= proxy server IP: Port number # Use a proxy server to install pip install [package-name] --upgrade # The update name is [package-name] My bag pip uninstall [package-name] # Delete the name [package-name] My bag pip list # List all installed packages in the current environment