Solution for PIP appears after Windows installs Python2 and 32 versions

Source: Internet
Author: User
This article mainly for you to share is in Windows under the installation of Python2 Python3 after the PIP error resolution, very practical, the need for small partners can refer to the next

Before you install Python at the same time, simply change the environment variable path inside to

path=c:\python36-32\scripts\; C:\Python36-32\; C:\Python27\; C:\Python27\scripts

Then, the Python3 installed files are modified as follows:

C:\Python36-32\scripts\pip.exe Change to C:\Python36-32\scripts\pip3.exe

C:\Python36-32\python.exe Change to C:\Python36-32\python3.exe

C:\Python36-32\pythonw.exe Change to C:\Python36-32\pythonw3.exe

This allows commands such as the Python python3 pip pip3 to be used directly on the cmd command line

The latest version of the Python2 and Python3 python 2.7.13 and Python are installed because of the recent reload system 3.6.0

As described above, the python pip python3 Command works fine, but the following error is displayed when PIP3 executes:

Fatal error in launcher:unable to create process using ' "'

It is clear that process-related files were not found when the process was established. Find a way to do it.

Found in the C:\Python36-32\scripts directory has the same icon and the same number of KB files file name is not the same, the function of the call is not the same as several EXE files:

Easy_instal3l.exe

Easy_install-3.6.exe

Pip.exe

According to experience that these EXE files are actually the same EXE file with different resources or in the debugging field called additional resources to execute different Python script, with 7z open to confirm my guess

First go to Google A will find pip this exe source code, looked for a while did not find, I directly with Ida PRO F5, this exe probably logic is to find the exe last how many bytes with a special symbol to split the beginning of a string and set up the process additional parameters and execution.

Open the Pip.exe with the hex editor and turn to the last part.

Look at the red circle of the part, found that this is a dead path, should be the Python installation attached to this string, OK, directly

C:\python36-32\python.exe change to C:\python36-32\pytho3.exe save.

Then copy C:\Python36-32\python3.exe instead of C:\Python36-32\pytho3.exe

You read the wrong, remove the N, because the original string Python.exe has 10 characters, we usually modify the EXE in order to work normally does not produce data offset, etc.

Error to ensure the length and position of the string, in order to lazy I directly to pytho3.exe this can work properly.

The next step is to find this Pip.exe "shell" code and installer what is attached to this resource and see if it is possible to mention a bug fix that turns him into a python3 location that automatically gets the ancestor path of the current EXE path.

"Recommended"

1. Python Free video tutorial

2. Python Learning Manual

3. Python Object-oriented video tutorial

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.