pyenv / pyenv-installer

This tool is used to install `pyenv` and friends.
MIT License
3.96k stars 428 forks source link

Installer not working on MacOS 12.6.1 #136

Closed bile0026 closed 1 year ago

bile0026 commented 1 year ago

Constantlly getting a "killed" message when trying to run the pyenv installer. Seems like maybe it could be related to System Integrity Protection, but I have another box with MacOS 12.6.0 installed and it has SIP enabled though pyenv was installed prior to the upgrade to 12.6. I was somewhat able to get the manual install to work, but I get the same thing when trying to run pyenv command. The only other difference I can think of is this new laptop has the M1 Max vs the M1 Pro CPU though I can't imagine that would make much of a difference. Any ideas would be appreciated.

@MacbookPro10  ~/Documents/testing  curl https://pyenv.run | bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   270  100   270    0     0    439      0 --:--:-- --:--:-- --:--:--   443
curl: (23) Failed writing body
[1]    28516 exit 23    curl https://pyenv.run |
       28517 killed     bash
@MacbookPro10  ~/Documents/testing  pyenv
[1]    28494 killed     pyenv
native-api commented 1 year ago

If it's an antivirus, there must be a way to see its activity logs to find out what specifically it doesn't like. I would start there.

robnagler commented 1 year ago

https://stackoverflow.com/a/72564807 talks about target architecture issues. https://stackoverflow.com/a/66860351 says you need to disable SIP one time and then re-enable it. Disabling SIP would tell you if it was SIP or not.

bile0026 commented 1 year ago

https://stackoverflow.com/a/72564807 talks about target architecture issues. https://stackoverflow.com/a/66860351 says you need to disable SIP one time and then re-enable it. Disabling SIP would tell you if it was SIP or not.

I did end up temporarily disabling SIP, which allowed the install of pyenv to complete, and I was also able to install version 3.8.13 with pyenv install 3.8.13. After re-enabling though nothing happens when I run any pyenv commands, it just exists silently. Running which pyenv seems like maybe some reference is goofed up?

@MacbookPro10  ~  pyenv install 3.8.12
@MacbookPro10  ~  pyenv versions
@MacbookPro10  ~  pyenv help
@MacbookPro10  ~  
@MacbookPro10  ~  which pyenv
pyenv () {
    local command
    command="${1:-}"
    if [ "$#" -gt 0 ]
    then
        shift
    fi
    case "$command" in
        (activate | deactivate | rehash | shell) eval "$(pyenv "sh-$command" "$@")" ;;
        (*) command pyenv "$command" "$@" ;;
    esac
}
bile0026 commented 1 year ago

Looks like I found the issue, I had used migration assistant to move my profile from an intel-based mac to this new M1. I had a leftover broken rust install in ~/.new_local. Removed that folder and now pyenv is working with SIP enabled. Thanks for the tips!