lektor / lektor-website

The main lektor website.
https://www.getlektor.com/
Other
160 stars 134 forks source link

BUG: Installing on windows fails. --prefer-binary option for the venv pip is not recognized. #306

Closed JVanloofsvelt closed 2 years ago

JVanloofsvelt commented 4 years ago

On Windows, the virtual environment created by installer.py comes with an old pip version. It complains about the option '--prefer-binary' since this option was not supported by the old pip version.

It might be related to the fact that I have an older Python 3.5 installation that came with an older pip version.

JVanloofsvelt commented 4 years ago

I did some research, apparently the installer has three strategies for creating a virtualenv:

  1. using the builtin venv module
  2. using virtualenv from site-packages if venv was not an option
  3. Downloading virtualenv if virtualenv was not found

Remarks:

How should the installer.py be modified then? IMO: use_venv() should fail (or rather be skipped) if the pip version that comes with ensurepip() is older than version 18.0.

JVanloofsvelt commented 4 years ago

I'm guessing I created this issue in the wrong repository. I created a copy in the Lektor repository: https://github.com/lektor/lektor/issues/808

andoresuperesu commented 4 years ago

Not the wrong repo if the fix can be applied to the installer script located here.

JVanloofsvelt commented 4 years ago

Thanks Andres, I was looking for it!

CAM-Gerlach commented 2 years ago

This can be closed along with #307 , presumably, since it sounds like the old installer script will be deprecated/removed if it isn't already.