-
-
Notifications
You must be signed in to change notification settings - Fork 350
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
briefcase run
returns "Failed to create a default .NET runtime"
#1017
Comments
Thanks for the report. I can't say I've seen this behaviour myself; Can I ask what (if any) .NET libraries you have installed on your system? I didn't think it was necessary to install a .NET runtime for Python.net to work... but maybe it is required? |
i have this problem on win10 with py311 |
@coolcoder613eb That doesn't address the most recent question that I asked - What (if any) .NET libraries do you have installed? |
it worked before i upgraded to py311, so i do not think it is relevant.
when i upgraded, i symlinked my 3.10 site-packages to my 3.11 ones to save
disk space.
…On Mon, 9 Jan 2023 at 17:46, Russell Keith-Magee ***@***.***> wrote:
@coolcoder613eb <https://github.com/coolcoder613eb> That doesn't address
the most recent question that I asked - What (if any) .NET libraries do you
have installed?
—
Reply to this email directly, view it on GitHub
<#1017 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AW5VQRBN7JVY6ZJZWZZO2E3WROX5RANCNFSM6AAAAAATI6M5EE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@coolcoder613eb Symlinking site packages across Python versions is not an approach that is likely to yield reliable results. It's entirely possible that you've created this problem on your own. If you can reproduce the problem with a vanilla installation, then please provide the briefcase crash log, as well as the detail I've requested about .NET. |
[Moved to #1060] |
@CarlosHGL, can you take a look at #922 and see if one of the workarounds help you finish the build? I don't see anything obviously wrong but I can see you are using Python from the Windows Store. |
@rmartin16: This looks like a different problem, so I've moved it to a separate issue (#1060). |
briefcase run
returns "Failed to create a default .NET runtime"
@jlij No - because we've been waiting on someone to provide the detail that has been requested. What (if any) .NET libraries do you have installed on your system when you observe this problem? |
This issue seems to stem from using a 32bit version of Python to run Python will include its bitness when running the interpreter: 32 bit ❯ python
Python 3.11.3 (tags/v3.11.3:f3909b8, Apr 4 2023, 23:34:50) [MSC v.1934 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> 64 bit ❯ python
Python 3.11.2 (tags/v3.11.2:878ead1, Feb 7 2023, 16:38:35) [MSC v.1934 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> Therefore, the workaround is to use a 64 bit version of Python to run Briefcase. |
After a little more investigation, the underlying problem is the the 32bit Windows wheel for
Since the stub app is compiled for 64 bits, we need the 64 bit version of Pip supports overriding how it requests wheels such that wheels for arbitrary platforms can be installed. Something like this in def _extra_pip_args(self, app: AppConfig):
return ["--platform", "win_amd64", "--only-binary", ":all:"]
Additionally, pip insists on a setting for binary or not:
|
So - this is all good diagnosis, but... how much do we care? How big is the market for 32-bit Windows these days? If these metrics are to be believed, the size of the 32 bit Windows market is 0 within the margin of error. Given that we can't unit test 32 bit Windows (AFAIK), wouldn't our safe option be to just raise an error if the user is on a 32 bit system and move on? |
This isn't about 32bit Windows, though. This is about 32bit Python. |
Sure - but... same story. Is there any good reason someone is using 32-bit Python on a 64-bit system, other than "it exists and I didn't know there was an alternative, I just downloaded the first installer I saw on the list"? Finding market share numbers for 32-bit Python is a little harder to come by, but I can't really think of a reason anyone would be actively using 32-bit Windows on a 32 bit system, other than legacy. |
We're definitely on the same page about support for 32-bit Windows. As for 32-bit Python, I doubt there's any broad and/or reasonable rationale to run it nowadays....maybe someone needs to use a package that's only 32-bit compatible....but I don't think that's a good rationale to impact our decisions here. Mostly, I would expect people running 32-bit Python to be doing so largely arbitrarily. It wasn't until Python 3.9, that python.org pushed 64-bit as the default download. Ultimately, I'm not necessarily advocating for supporting 32-bit Python. And since I've already been evaluating how to limit Briefcase to only running commands on supported architectures, this check would add another layer...albeit only really for Windows. This also would ideally allow Windows on arm64 to still work...personally, I think Windows on ARM may see a real uptake in the next few years (or longer) but we'll see... And then there's 32-bit ARM...but I'll spare us here :) At the end of the day, I'm definitely not interested in a bunch of complications to support these niche platform combinations. But I think I'd also like to see some of them work if it doesn't take too much work. (Speaking of which, my proposed solution in the diagnosis would complicate arm64 support...) If I do anything here, it'll likely be a part of the larger architecture verification I've been looking at. |
Somewhat of a proxy metric for 32-bit Python on Windows. |
Describe the bug
Hi,
Following your tutorial, it failed when I used the “briefcase.exe run” command.
The create and build commands didn't fail. I can also use the briefcase dev command with no problems.
briefcase run log
After some research, I tried to install the cffi package (after uninstalling it) in the environment, but also outside.
It didn't solve the problem.
I don't know if some people have already had this issue.
If you need more information, please ask me.
Steps to reproduce
Expected behavior
No error returned.
Screenshots
No response
Environment
Logs
full briefcase run log
Additional context
No response
Workaround
The issue occurs when running 32-bit Python. Install and use Briefcase with 64-bit Python. Full details.
The text was updated successfully, but these errors were encountered: