PythonEnvironments icon indicating copy to clipboard operation
PythonEnvironments copied to clipboard

Triggering GetPip before installing packages

Open peardox opened this issue 3 years ago • 19 comments

It appears to be impossible to get PIP installed via GetPIP BEFORE installing packages

As GetPIP should install the latest version of PIP it is desirable to have this rather that the pre-packaged version

Whatever I try GetPIP always fires AFTER I've installed all the packages

peardox avatar Oct 11 '22 04:10 peardox

Add-ons creation time is currently managed by developers. Make sure you have it create right after the Python environment does.

lmbelo avatar Oct 11 '22 14:10 lmbelo

Shouldn't the components be excluded from the package installation then and supporting documentation written?

Note - my tutorial can serve as documentation while the component is not quite right

peardox avatar Oct 11 '22 15:10 peardox

Actually - if it works but just not in the desired order then leave component as-is owing to the fact that some people may not want to install any packages

peardox avatar Oct 11 '22 15:10 peardox

Actually - if it works but just not in the desired order then leave component as-is owing to the fact that some people may not want to install any packages

This is not tough to fix. I presume I can solve this quickly.

lmbelo avatar Oct 11 '22 17:10 lmbelo

It would also be a good idea to have the Android so files in the repo so when cloned everything works (even though Droid is a bit limited) as then I can tell people to add the environment variable as part of my tutorial - want a PR or you gonna do this?

peardox avatar Oct 11 '22 17:10 peardox

I can do it. I'd also take the .so for macOS.

lmbelo avatar Oct 11 '22 21:10 lmbelo

Cool - I'm mega busy with Tutorials anyway so that's a great help.

My demo prog failed on a tester's PC - he's running it on drive E :( Tring it on a USB Stick (also E - taking forever...)

peardox avatar Oct 11 '22 21:10 peardox

@peardox components creation order were enhanced. Can you try it once?

lmbelo avatar Oct 30 '22 13:10 lmbelo

I'll update everything and give it a try

No update property for GetPip or EnsurePip I notice

Python4Delphi still needs an ifndef on the fmxpython require for Linux and Linux compile included as noted Components need Linux targets

peardox avatar Oct 30 '22 14:10 peardox

Your boss-lock.json files all specify <filename>280.ext - don't know if this matters but it is a bit too version specific

peardox avatar Oct 30 '22 18:10 peardox

ReChecking - summat odd happened

peardox avatar Oct 30 '22 19:10 peardox

boss-lock.json is locally updated.

lmbelo avatar Oct 31 '22 00:10 lmbelo

Is it reopened?

lmbelo avatar Oct 31 '22 00:10 lmbelo

Everything fine after the fix for PythonEnvironment

I've only run cursory tests so far

Can't test pip proerly until they update it again - shouldn't be too long though

peardox avatar Oct 31 '22 00:10 peardox

Everything fine after the fix for PythonEnvironment

I've only run cursory tests so far

Can't test pip proerly until they update it again - shouldn't be too long though

Sorry, until they update... (?)

lmbelo avatar Oct 31 '22 00:10 lmbelo

When pip updates to a new version then I can see what happens (do I get an updated PIP?)

peardox avatar Oct 31 '22 00:10 peardox

Have in mind that get-pip is a bootstrap file intended for offline installation. EnsurePip is a Python module that would install the PIP version bundled with it. Upgrading both would be another issue. We should upgrade the get-pip bootstrap file as they release new ones. For EnsurePip, we would need to recompile Python with the latest version. We can provide an option on both add-ons to automatically upgrade it or a new managed package to provide any PIP module operation.

lmbelo avatar Oct 31 '22 01:10 lmbelo

We can provide an option on both add-ons to automatically upgrade it or a new managed package to provide any PIP module operation.

That's what my Upgrade property in GetPip was doing if you were online

EnsurePip with an --upgrade (python -m ensurepip --upgrade) didn't work when I tried it while GetPip with the --upgrade (python -m pip install --upgrade pip) definitely worked.

This means that they're stuck with whatever pip is packaged still..

peardox avatar Oct 31 '22 01:10 peardox

Python -m ensurepip --upgrade will guarantee to upgrade to the bootstrapped version. Python -m pip install --upgrade pip has the same functionality as for any other pip package.

lmbelo avatar Oct 31 '22 02:10 lmbelo