Switching Python version (3.9 → 3.8) installed by Homebrew

前端 未结 2 1159
暗喜
暗喜 2021-01-25 17:36

It’s a very similar situation like described here, but vice versa. I have Python 3.8 installed via Homebrew and updated that to 3.9:

% brew list --formula | grep          


        
2条回答
  •  一整个雨季
    2021-01-25 18:11

    Well, sometimes it helps to ask the question to find the solution on your own – one of the great things of StackOverflow, by the way.

    The hint is in the warning of pipenv: "Your Pipfile requires python_version 3.9".

    I simply did

    rm Pipfile
    rm Pipfile.lock
    

    and then it worked:

    pipenv install google-ads
    

    Well, at least pipenv worked correctly with Python 3.8. There is still an issue with google-ads, but that's another story.

    Probably it would have been enough to change the Pipfile:

    [requires]
    python_version = "3.8"
    

提交回复
热议问题