Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Improve error message when no valid Python interpreter can be resolved #7628
Currently, when a valid interpreter cannot be found, such as by running
A user reported that they were very confused by this message. It seems the main issue was not explaining what to do to fix it, which led to them searching through GitHub and getting confused with our Python 3 migration efforts (e.g.
The other motivating factor is our setup repo failing to find a Python 3.6+ interpreter, despite us knowing for a fact that it is installed and on the PATH. https://travis-ci.org/pantsbuild/setup/jobs/524685486#L355. Here, it would be extremely helpful if we knew what Pants is resolving.
Improve the message to do two things:
stuhood left a comment •
While it would be great to have a test for this branch of the code itself (it's fairly large!), I'm fine with merging as is, since this is a huge improvement.
Would you mind following up to add an integration test covering this?
Happy to! Although I have no idea how to do so hermetically. The main functionality we should test is grabbing all of the interpreters on the system. I don't know how to do this in a way that works on multiple platforms.
One idea, use
We wouldn't be testing that we are grabbing all interpreters, though. Is this okay?
What we would end up testing is
Definitely value in this, just not testing the whole thing.