Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

macos 10.15.7 How to remove python 2.6

I am attempting to install PlatformIO on a iMac 2019 macos 10.15.7 but I get the following error: OSError: [Errno 86] Bad CPU type in executable: '/Library/Frameworks/Python.framework/Versions/2.6/bin/python'


I get the same error if I enter python2.6 in to a terminal window.

I am sure that python 2.6 is 32 bit and Catalina is 64 bit.


From a terminal echo $PATH gives the following :

/Library/Frameworks/Python.framework/Versions/3.9/bin:/Library/Frameworks/Python.framework/Versions/3.9/bin:/Library/Frameworks/Python.framework/Versions/3.8/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/opt/local/bin:/opt/local/sbin:/Library/Frameworks/Python.framework/Versions/2.6/bin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:/opt/X11/bin:~/.dotnet/tools:/Library/Frameworks/Mono.framework/Versions/Current/Commands


I am unable to find any instructions for removing python 2.6, do you know of any? Could I just change the PATH statement if so how? Can I just delete the /Library/Frameworks/Python.framework/Versions/2.6 directory ?






iMac 27″, 10.13

Posted on Nov 30, 2020 8:47 AM

Reply
Question marked as Best reply

Posted on Dec 1, 2020 3:12 AM

Thank you again VikingOSX, the problem is now fixed and PlatformIO is now installed. Whilst trying to find how to permantly change the PATH statements I cam across a method for the Zsh shell. I then noticed a prompt on my terminal window to change to the Zsh by entering "chsh -s /bin/zsh". I did this and the tried the echo $PATH I now get /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:/opt/X11/bin:~/.dotnet/tools:/Library/Frameworks/Mono.framework/Versions/Current/Commands

All duplicates have gone and PlatformIO installs.

Thank you again for your help

Similar questions

5 replies
Question marked as Best reply

Dec 1, 2020 3:12 AM in response to VikingOSX

Thank you again VikingOSX, the problem is now fixed and PlatformIO is now installed. Whilst trying to find how to permantly change the PATH statements I cam across a method for the Zsh shell. I then noticed a prompt on my terminal window to change to the Zsh by entering "chsh -s /bin/zsh". I did this and the tried the echo $PATH I now get /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:/opt/X11/bin:~/.dotnet/tools:/Library/Frameworks/Mono.framework/Versions/Current/Commands

All duplicates have gone and PlatformIO installs.

Thank you again for your help

Nov 30, 2020 9:01 AM in response to Jasea

The default System Python that you access in Catalina (or Big Sur) is v2.7.16. The default Python3 that you access is v3.9.0 (due to your PATH setting). Ignore removing Python 2.6.


You need one entry in your PATH statement and you have redundancies:

export PATH="$HOME:/usr/local/bin:/Library/Frameworks/Python.framework/Versions/3.9/bin:$PATH"

macos 10.15.7 How to remove python 2.6

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.