-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
CPython2 support for macOS Big Sur #2023
Comments
I actually failed to reproduce on a x86_64 mac, despite the signature not being valid there too. I did originally hit this on an arm64 DTK, and got someone else to reproduce on one of the new M1-based Mac minis, and there appear to be two levels with this:
And indeed, the executable behind |
Editing
|
FWIW, I confirmed both are independent:
|
Let's spin out the M1 part into #2024, as for the Big Sur one we can follow it here. It's a new OS/platform so virtualenv not working on them is a feature request rather than a bug one. I don't have at the moment access to Big Sur machine, so can't help with it, so PRs welcome. |
As mentioned in the second comment, the codesign validity preventing python from running actually doesn't happen on x86_64 based Big Sur, for some reason, although the code signature is invalid. |
Any way to check if the certificate/whatever had an expiry date or compatibility info that makes it incompatible with Big Sur? |
The problem is virtualenv is editing the executable to change its dependencies to use |
The problem is without the edit, the executable will not run. Changing that path invalids the signature, but it is the only way we can create a virtual environment. Not sure what else we can do. We could resign it, but for that, you need a key, and we'd not even be the same key, etc. Considering CPython 2 is EOL on macOS, I'd not expect them to offer any solutions for it. @glandium ideas? |
Another one:
But it doesn't happen here:
So I guess if virtualenv itself would do the code signing, it would work™. But the arm64e problem is unsolvable if virtualenv can't be made to work with symbolic links. That said, after It really sucks that the failure mode is that the process is killed rather than a more useful error message directly on the command line (instead of hidden in the console log). |
It's not that virtualenv can't be made to work with, but rather there's no way to make the cpython 2 interpreter work with symlinks. |
Creating a symlink from venv/bin/python to the real python works just fine, but I assume sys.path is not correct (although I haven't compared). |
Creating a symlink is just a symlink. Will behave exactly as the target python would behave. That's the opposite of what a virtual environment is. Making a virtual environment means ensuring the |
I found that codesign would work if you copy in and out the folder once:
|
just installed django 1.8 envs on Apple M1 using virtualenv successed, hope it will help you https://gist.github.com/MxJ24/e1386c9012f533cfbedfed5114da3e60 |
I totally agree. #2179 will fix at least this. |
We no longer support Python 2. |
Issue
After creating a virtualenv with python2 from the Command Line Tools, running the python executable from that virtualenv fails:
The problem comes from code signature not matching:
This doesn't happen with python3.
The text was updated successfully, but these errors were encountered: