Embarcadero/PythonEnvironments

GetPIP Doesn't update the PIP version

peardox opened this issue · 5 comments

Current PIP is 22.2.2

Running GetPIP leaves us at 22.0.4

There are too much packages to keep up to date. I will do it as possible.
You can use the EnsurePip add-on instead, if you have internet connection available.

Ooh, current PIP is actually 22.3 - just found out by removing the do-nothing bit in GetPIP

Works nicely but doesn't immediately register. If you run (fixed) GetPIP then it will update PIP but re-running a script which shows PIP version returns same until Python is restarted. That's OK - we can live with that...

EnsurePIP also has the do-nothing code - removing that resulted in no module found

PR incoming... (just gotta pull, remove some lines and push)

Use GetPIP when there is no internet connection available. Use EnsurePIP when internet connect is available.

What is that PR supposed to do?

Remove the code that disables GetPip (leaving EnsurePIP alone)

GetPIP will update PIP correctly pulling latest PIP from remote

Both procs start with this....

  if (TExecCmdService.Cmd(ADistribution.Executable,
        TExecCmdArgs.BuildArgv(
          ADistribution.Executable, ['-m', 'pip', '--version']),
        TExecCmdArgs.BuildEnvp(
          ADistribution.Home,
          ADistribution.Executable,
          ADistribution.SharedLibrary)
      ).Run().Wait() = EXIT_SUCCESS) then
        Exit;

That'll always run fine and so you'll never get past it to the actual code that you want to run