Tag Archives: Python

Non working Python 3 – invalid active developer path

I’ve recently updated macOS Big Sur to version 11.2.2, and it seems that after this update I run into issues with running my Python programs from PyCharm, which started to give me the following error on attempt to execute any program:

Error running 'P3-2': Cannot run program "/Users/User_Name/PycharmProjects/Project_Name/venv/bin/python" (in directory "/Users/User_Name/PycharmProjects/Project_Name"): error=2, No such file or directory

I’ve looked into relevant venv directory which contained symbolic link to Python executable which, in turn, by the looks of it in Finder, was broken (path/target cannot be found). I found that strange as Python 3 was installed and working for quite some time, so I tried to run python3 from terminal and saw the following error:

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

Long story short to fix that it was necessary to download and install the Command Line Tools package using the following command:

xcode-select --install

Not quite sure why it stopped working for me, but possibly installed version got removed during macOS update process.

What is “Syntax Error”?

I’m currently revisiting Programming for Everybody (Getting Started with Python) course on Coursera by Charles Severance by/University of Michigan and have an idea to join “Python for Everybody Specialization” which become available recently. What is cool about this course is that Charles Severance (a.k.a. Dr. Chuck – www.dr-chuck.com) is really making an effort to make your introduction gentle and ensure that newbies have comfortable start both with Python and with programming in general. This is something I really didn’t have when I studied related subjects in my almamater, where my teacher’s style was “you know that F1 button, right?”

Anyhow early modules try to cover some basics and I really like the way this course explains what you should think about “syntax error” message you may get all to often when you making first steps with any new language, here is a question from one of the quizzes:

Python Syntax Error

I’m not going to indicate correct answer to you, just highlighted the funniest option. 🙂