env: python: No such file or directory when building app with Xcode

We Are Going To Discuss About env: python: No such file or directory when building app with Xcode. So lets Start this Python Article.

env: python: No such file or directory when building app with Xcode

  1. How to solve env: python: No such file or directory when building app with Xcode

    Homebrew only installs the binary python3, just to be safe. Xcode is complaining about a lack of the binary python (note the lack of a 3!).
    You have a couple of options:
    When installing python3, Homebrew also creates a libexec folder with unversioned symlinks, such as python (what you're missing). Note the Caveats printed when installing it:
    $ brew info python [email protected]: stable 3.9.10 (bottled) ==> Caveats Python has been installed as /opt/homebrew/bin/python3 Unversioned symlinks `python`, `python-config`, `pip` etc. pointing to `python3`, `python3-config`, `pip3` etc., respectively, have been installed into /opt/homebrew/opt/[email protected]/libexec/bin See: https://docs.brew.sh/Homebrew-and-Python
    You could add this directory to your $PATH, such that python and pip become available; something like the following might suffice:
    echo 'export PATH="'"$(brew --prefix)"'/opt/[email protected]/libexec/bin:$PATH"' \ >>~/.bash_profile
    … although that will need to be modified according to your precise version of Python3, your shell of choice, etc.
    Alternatively and more simply, although a little more jankily, you could simply manually create the appropriate symlinks:
    ln -s "$(brew --prefix)/bin/python"{3,}

  2. env: python: No such file or directory when building app with Xcode

    Homebrew only installs the binary python3, just to be safe. Xcode is complaining about a lack of the binary python (note the lack of a 3!).
    You have a couple of options:
    When installing python3, Homebrew also creates a libexec folder with unversioned symlinks, such as python (what you're missing). Note the Caveats printed when installing it:
    $ brew info python [email protected]: stable 3.9.10 (bottled) ==> Caveats Python has been installed as /opt/homebrew/bin/python3 Unversioned symlinks `python`, `python-config`, `pip` etc. pointing to `python3`, `python3-config`, `pip3` etc., respectively, have been installed into /opt/homebrew/opt/[email protected]/libexec/bin See: https://docs.brew.sh/Homebrew-and-Python
    You could add this directory to your $PATH, such that python and pip become available; something like the following might suffice:
    echo 'export PATH="'"$(brew --prefix)"'/opt/[email protected]/libexec/bin:$PATH"' \ >>~/.bash_profile
    … although that will need to be modified according to your precise version of Python3, your shell of choice, etc.
    Alternatively and more simply, although a little more jankily, you could simply manually create the appropriate symlinks:
    ln -s "$(brew --prefix)/bin/python"{3,}

Solution 1

Homebrew only installs the binary python3, just to be safe. Xcode is complaining about a lack of the binary python (note the lack of a 3!).

You have a couple of options:

  1. When installing python3, Homebrew also creates a libexec folder with unversioned symlinks, such as python (what you’re missing). Note the Caveats printed when installing it:

    $ brew info python
    [email protected]: stable 3.9.10 (bottled)
    ==> Caveats
    Python has been installed as
      /opt/homebrew/bin/python3
    
    Unversioned symlinks `python`, `python-config`, `pip` etc. pointing to
    `python3`, `python3-config`, `pip3` etc., respectively, have been installed into
      /opt/homebrew/opt/[email protected]/libexec/bin
    
    See: https://docs.brew.sh/Homebrew-and-Python
    

    You could add this directory to your $PATH, such that python and pip become available; something like the following might suffice:

    echo 'export PATH="'"$(brew --prefix)"'/opt/[email protected]/libexec/bin:$PATH"' \
       >>~/.bash_profile
    

    … although that will need to be modified according to your precise version of Python3, your shell of choice, etc.

  2. Alternatively and more simply, although a little more jankily, you could simply manually create the appropriate symlinks:

    ln -s "$(brew --prefix)/bin/python"{3,}
    

Original Author ELLIOTTCABLE Of This Content

Solution 2

I had posted the same question on nativescript official github and the solution that worked for me was in the answer by the user shilik

Monterey 12.3 removes python 2. All you need to do is to reinstall
python2 back to system from this link
https://www.python.org/downloads/release/python-2718/

Original Author ipald Of This Content

Solution 3

  1. install python3
  2. run ‘ln -s /usr/bin/python3 /usr/local/bin/python’,Create a link to Python

Original Author 贾亚光 Of This Content

Solution 4

just for me, add -f to be effective.

ln -s -f /usr/local/bin/python3 /usr/local/bin/python

Original Author Aksel Limmes Of This Content

Conclusion

So This is all About This Tutorial. Hope This Tutorial Helped You. Thank You.

Also Read,

ittutorial team

I am an Information Technology Engineer. I have Completed my MCA And I have 4 Year Plus Experience, I am a web developer with knowledge of multiple back-end platforms Like PHP, Node.js, Python and frontend JavaScript frameworks Like Angular, React, and Vue.

Leave a Comment