Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't run electrum 4.2.0 on Windows 7 (api-ms-win-core-path-l1-1-0.dll is missing from your computer) #7728

Closed
denbkh opened this issue Mar 22, 2022 · 9 comments

Comments

@denbkh
Copy link

denbkh commented Mar 22, 2022

When I start electrum-4.2.0.exe on Windows 7 I get this error:
The program can't start because api-ms-win-core-path-l1-1-0.dll is missing from your computer. Try reinstalling the program to fix this problem.
According to this, the problem is related to python 3.9, it doesn't support Windows 7.
Readme file for electrum contains Language: Python (>= 3.8), therefore, it should be possible to build electrum for Windows 7 with Python 3.8.
Could you please build the latest electrum with Python 3.8?

@SomberNight
Copy link
Member

And to confirm, Electrum 4.1.5 did run on Windows 7, right?
May I ask why you are still using Windows 7?

Is Win7 still getting security updates?
Wikipedia lists "Expiration date" as:

Mainstream support	January 13, 2015
Extended support	January 14, 2020

We did not realise we broke compatibility with Win7 -- the change was not intentional, but I wonder if Win7 is still worth supporting.
As long as it is that simple, I suppose we could build the Win binaries with python 3.8. py3.8 is getting security fixes for several more years.

Hmm, according to the Steam hw survey, 4.4% of Windows users (using Steam) are on Win7 these days.
I find that surprisingly high. Even more so, considering I would expect the Steam survey to skew towards power users.

February 2022
Windows Version

Windows 10 64 bit    78.54%
Windows 11 64 bit    16.18%
Windows 7 64 bit      4.24%
Windows 8.1 64 bit    0.66%
Windows 7             0.19%
Windows 10            0.08%
Other                 0.11%

@denbkh
Copy link
Author

denbkh commented Mar 22, 2022

And to confirm, Electrum 4.1.5 did run on Windows 7, right?

Yes, Electrum 4.1.5 runs on Windows 7 without any problems.

May I ask why you are still using Windows 7?

Old hardware (no drivers for win 10 & 11), don't have time for upgrade, 99.9% of software (browsers, IDE, developer tools, etc..) still work on Windows 7 without problems.

4.4% of Windows users (using Steam) are on Win7 these days

According to StatCounter, global market share for Windows 7 is ~12%, and in some countries much higher: China ~32%, India ~25%, etc...
I think Steam stats is biased, because they count mostly gaming PCs.

@SomberNight
Copy link
Member

SomberNight commented Mar 22, 2022

And to confirm, Electrum 4.1.5 did run on Windows 7, right?

Yes, Electrum 4.1.5 runs on Windows 7 without any problems.

I've tested this myself now. Documenting here for posterity.
Testing with a fresh install of Windows 7 x64 SP1, I've tried to run Electrum 4.1.5:

  • got first error:

    The program can't start because api-ms-win-crt-runtime-l1-1-0.dll is missing from your computer. Try reinstalling the program to fix this problem.

  • got second error:

    Failed to execute script pyi_rth_pkgres

    • using the "debug" exe unpacked by the Electrum installer exe we distribute, traceback:
      C:\Program Files (x86)\Electrum>electrum-4.1.5-debug.exe
      Traceback (most recent call last):
        File "C:\python3\Lib\site-packages\PyInstaller\hooks\rthooks\pyi_rth_pkgres.py
      ", line 13, in <module>
        File "PyInstaller\loader\pyimod03_importers.py", line 531, in exec_module
        File "pkg_resources\__init__.py", line 35, in <module>
        File "PyInstaller\loader\pyimod03_importers.py", line 531, in exec_module
        File "plistlib.py", line 65, in <module>
        File "PyInstaller\loader\pyimod03_importers.py", line 531, in exec_module
        File "xml\parsers\expat.py", line 4, in <module>
      ImportError: DLL load failed while importing pyexpat: The parameter is incorrect
      .
      [3552] Failed to execute script pyi_rth_pkgres
    
    • fixed by installing Windows6.1-KB3063858-x64 (and then rebooting)

@SomberNight
Copy link
Member

As long as it is that simple, I suppose we could build the Win binaries with python 3.8. py3.8 is getting security fixes for several more years.

Ah, I forgot that for the Windows builds we use the official binary builds of python from python.org (instead of cross-compiling from source on Linux, see #6565).

New releases from the Python 3.8.x branch no longer get binary builds anymore, only source-only security fixes. (see https://peps.python.org/pep-0569/)
The last binary release was 3.8.10: Monday, 2021-05-03 (final regular bugfix release with binary installers)

This means that with our current build scripts if we wanted to bundle python 3.8, we would be stuck with 3.8.10, and not get security fixes. :/

@denbkh
Copy link
Author

denbkh commented Mar 23, 2022

Is it possible to build electrum with python from msys2 repository? I installed Python 3.9.11 from there and it seems to work on Windows 7.

@SomberNight
Copy link
Member

Not sure... do you mean we would build python from their sources, or that they distribute a binary and we could use that?

We currently use the binary built by python.org, so we trust them. It is not ideal but I find this reasonable.
I am not sure I would trust anyone else to build the binary for us; which leaves the alternative of building from source.

We could try to cross-compile the msys2 python using mingw, as in #6565. If that could be made to work, I would actually prefer that to the status quo. However, that seems like a lot of work. PRs would be welcome.

@SomberNight
Copy link
Member

Possible ways to fix:

Note that any approach would require being able to build reproducible binaries (as is already the case), and we heavily dislike bundling pre-built binaries.


Considering that

  • Win7 itself is no longer receiving security fixes,
  • there does not seem to be an easy way to keep supporting Win7,
  • I am still a bit doubtful there are a lot of Win7 users out there,

my decision for now is to drop support for Windows 7.

If someone comes along and starts contributing towards supporting Windows 7, then we could potentially reintroduce support, however as it stands we don't have time to do it ourselves.

Existing Win7 users can keep using Electrum 4.1.5 for the time being -- but they should consider upgrading or changing their OS.

@denbkh
Copy link
Author

denbkh commented Mar 24, 2022

I am still a bit doubtful there are a lot of Win7 users out there,

Why do you think so? Can you provide any data or evidence? For example, Statista has the similar stats for Windows 7 as StatCounter, ~12%.

@SomberNight SomberNight changed the title Can't run electrum 4.2.0 on Windows 7 - please make build with Python 3.8 Can't run electrum 4.2.0 on Windows 7 (api-ms-win-core-path-l1-1-0.dll is missing from your computer) Mar 26, 2022
@BeholdersEye
Copy link

BeholdersEye commented Sep 10, 2022

* build the ["hacky" `api-ms-win-core-path-l1-1-0.dll`](https://github.com/nalexandru/api-ms-win-core-path-HACK) ourselves (as part of the build scripts) and include it in the binary

You might consider including the dll in the portable version, at least, since that would significantly increase its portability (likely a reason some people use the portable version).

* I am still a bit doubtful there are a lot of Win7 users out there,

Even now it represents 10% of Windows installs.

https://gs.statcounter.com/os-version-market-share/windows/desktop/worldwide

Existing Win7 users can keep using Electrum 4.1.5 for the time being

That is an ominous "for the time being". I'm a happy user of Electrum on Linux so it's no skin off my own nose but I would like to be able to recommend Electrum to my friends without saying "The first step is back up all your files before we install a new operating system..." and in any case it should not be necessary to replace the host operating system to use "portable" software.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants