简体   繁体   中英

Mac install python without developer tools

I am trying to install python 3.11 without the Mac developer tools, which will give me python3.9. But when I used the vscode to open a python file, the command line installer poped up and showed the following message 'the python3 command requires the command line developer tools....'. But I can run the python3 command in the terminal successfully.

The annoying part is the pop up window. I found some suggestions about relink or rebuild the Xcode / command line tools. But in my case, there is no Xcode path. Please let me know if there is a way to configure the path correctly.

Thank you,

I checked the link of python3 in /usr/bin I install the python directly from the http://python.org

Do you use Homebrew in your terminal?

You can try to run brew link --overwrite --dry-run python@3.11 in your terminal to see if you need to do an update for your env path. If you do need it, the terminal will give you suggestions to relink, ex. brew link --overwrite python@3.11 or rm '/usr/local/bin/2to3-3.11'


I also had an issue when installing python3.11 through Homebrew in my terminal, it said I must use xcode-select --install to install python3.11.

So later on, I followed this video step by step, and now it works. Whenever I check python3 --version , it returns Python 3.11.1 . It also allows me to install another library that depends on python3.11.

Maybe it is worth checking the current version in your terminal and seeing if need to install again the package.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM