Please, help me to switch to the Python 3.10 under macOS environment!
Hello everyone!
I'm not a professional coder, it's my hobby and passion.
But I've created an Open Source app for ear training on equalization, written in Python.
I build the binaries successfully for Windows and for macOS (x86_64) on my local computers with PyInstaller, with my spec files, running pyinstaller macos_build.spec
or pyinstaller windows_build.spec
correspondingly.
Though, I'm quite new to AppVeyor, I could build the Windows part of my recent release with it.
But unfortunately, I couldn't do the same on macOS environment.
I really need that, because my goal is to build a release both for x86_64 (Intel) and arm64 (Apple Silicon) platforms. I tried to do this for Intel first, because I own mac mini with i7, and I can test the binary manually.
The current codebase is adapted to Python 3.9 and 3.10. I do not know all the upcoming pitfalls yet, but the first problem I encountered with was that I simply couldn't switch from Python 3.8.9 to one of above-mentioned. Unlike the instructions for Windows, the macOS part of the documentation declares, that Python 3.10.8 is installed, but it has no paths.
I tried the following ones with no luck:
/Library/Frameworks/Python.framework/Versions/3.10
/Applications/Xcode-13.2.1.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.10
I tried several different settings like this:
image: macos-bigsur
environment:
matrix:
- PYTHON: "/Applications/Xcode-13.2.1.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.10"
PYTHON_VERSION: "3.10.11"
PYTHON_ARCH: "64"
init:
- export PATH="$PYTHON:$PYTHON/bin:$PATH"
No luck...
I even tried to use python3.10
command instead of python
or just python3
, and it says:
/usr/local/Cellar/appveyor-build-agent/7.0.3212/bash-shell.sh: line 51: python3.10: command not found
I would appreciate your help!
Thanks in advance!!!
Best,
Gdaliy.
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Owen McDonnell on 07 Feb, 2024 10:31 PM
Did you try locating the desired python binary at
$HOME/venv3.10
as is done on linux builds?Also, I see you have the command
pip -U install...
but-U
is an option for the install command so should come after.2 Posted by gdalik on 07 Feb, 2024 11:15 PM
No, I haven't. I'm not familiar with Linux at all...
Could you give me the right settings for YAML file, please?
As for
pip -U install
, yeah, right you are, thanks!--
UPD:
I have just built an artifact, installing Python 3.10 from scratch with homebrew (under macos-monterey) and creating the Python virtual environment:
But there are two issues:
- The smaller one is that the installation takes too much time;
- And the bigger one is that the AppVeyor macOS environment seems to have issues with symlinks. In the cases when PyInstaller (the same version, the same *.spec file) normally creates symlinks, it duplicates the files instead. So, the resulting *.app bundle is three times bigger than it should be, and it doesn't work...
This case is described in PyInstaller documentation:
Should I create a separate ticket for that?
Thanks again!
3 Posted by gdalik on 08 Feb, 2024 12:30 AM
And also, I didn't understand, how I could locate the desired python binary anywhere inside your virtual machine, if I don't know your macOS python paths... They are not documented. I tried to guess them with no success...
4 Posted by gdalik on 08 Feb, 2024 01:07 AM
UPD:
5 Posted by gdalik on 08 Feb, 2024 01:28 AM
Finally, this worked!
gdalik closed this discussion on 08 Feb, 2024 02:48 AM.