Closed alxmrs closed 3 months ago
What does uname -m
return on your machine? That's what we use to determine the arch.
This is what I get:
% uname -m
arm64
On Sun, Jul 21, 2024 at 12:01 AM Charlie Marsh @.***> wrote:
What does uname -m return on your machine? That's what we use to determine the arch.
— Reply to this email directly, view it on GitHub https://github.com/astral-sh/rye/issues/1253#issuecomment-2241306766, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARXAB2YUHUGEDE2I4HIEADZNLM4HAVCNFSM6AAAAABLGGIQQ2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBRGMYDMNZWGY . You are receiving this because you authored the thread.Message ID: @.***>
Interesting, I wonder if your curl runs through Rosetta or something...? The script is fairly straightforward so not clear to me how it could be going wrong:
...
REPO=astral-sh/rye
PLATFORM=`uname -s`
ARCH=`uname -m`
if [[ $PLATFORM == "Darwin" ]]; then
PLATFORM="macos"
elif [[ $PLATFORM == "Linux" ]]; then
PLATFORM="linux"
fi
if [[ $ARCH == armv8* ]] || [[ $ARCH == arm64* ]] || [[ $ARCH == aarch64* ]]; then
ARCH="aarch64"
elif [[ $ARCH == i686* ]]; then
ARCH="x86"
fi
BINARY="rye-${ARCH}-${PLATFORM}"
...
Interesting, indeed! That's a good hunch, my curl is set up for both platforms? I'm not sure why it went for x86 when installing rye:
file $(which curl)
/usr/bin/curl: Mach-O universal binary with 2 architectures: [x86_64:Mach-O
64-bit executable x86_64] [arm64e:Mach-O 64-bit executable arm64e]
/usr/bin/curl (for architecture x86_64): Mach-O 64-bit executable x86_64
/usr/bin/curl (for architecture arm64e): Mach-O 64-bit executable arm64e
On Sun, Jul 21, 2024 at 1:56 PM Charlie Marsh @.***> wrote:
Interesting, I wonder if your curl runs through Rosetta or something...? The script is fairly straightforward so not clear to me how it could be going wrong:
...
REPO=astral-sh/rye PLATFORM=
uname -s
ARCH=uname -m
if [[ $PLATFORM == "Darwin" ]]; then PLATFORM="macos" elif [[ $PLATFORM == "Linux" ]]; then PLATFORM="linux" fi
if [[ $ARCH == armv8 ]] || [[ $ARCH == arm64 ]] || [[ $ARCH == aarch64 ]]; then ARCH="aarch64" elif [[ $ARCH == i686 ]]; then ARCH="x86" fi
BINARY="rye-${ARCH}-${PLATFORM}"
...
— Reply to this email directly, view it on GitHub https://github.com/astral-sh/rye/issues/1253#issuecomment-2241582813, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARXAB335FANEZVUTE6RKH3ZNOOW5AVCNFSM6AAAAABLGGIQQ2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBRGU4DEOBRGM . You are receiving this because you authored the thread.Message ID: @.***>
curl
should not matter but what is bash
on your machine? file $(which bash)
?
Looks like that was the culprit! Good hunch.
file $(which bash)
/usr/local/bin/bash: Mach-O 64-bit executable x86_64
I'm happy to mark this as closed; seems like a rare/not so preventable error.
Thanks for the follow-up.
Which Python architecture gets installed when this is getting returned? 😅
file $(which bash)
/bin/bash: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64e:Mach-O 64-bit executable arm64e]
/bin/bash (for architecture x86_64): Mach-O 64-bit executable x86_64
/bin/bash (for architecture arm64e): Mach-O 64-bit executable arm64e
I posted this here, it was different than I expected.
https://github.com/astral-sh/rye/issues/1253#issuecomment-2243648984
Steps to Reproduce
On an ARM machine (I'm using an M1 Macbook Air):
curl -sSf https://rye.astral.sh/get | bash
file $(which rye)
Expected Result
Mach-O 64-bit executable arm64
Actual Result
Mach-O 64-bit executable x86_64
Version Info
I fixed this by manually installing the ARM version of rye before filing this issue. After the fix, this is what I have:
Stacktrace
No response