Skip to content

After the system python version update to 3.9, I get "No valid Python interpreter found" [PANTS 1.30. IDEA 2020.2/2020.3] #616

@slvrtrn

Description

@slvrtrn

Started to have this issue after Ubuntu 20.04 -> 21.04 upgrade.
Verified in IDEA 2020.2 with the stable plugin and with 2020.3 bleeding-edge version (released on 24th of March 2021, Pants Support 1.17.0.7c71f505173a6499b6e0c91651e10ed03c6d2ff0)

PANTS work fine from the console (I am able to bootstrap the project and run the app or the tests), but it is not possible to refresh (or import) the project in IDEA.

I am using pyenv for the 3.8.6 setup. The actual package python3.8 is removed from Ubuntu 21.04 and replaced with python3.9 by default.

I also have .python-version file in the project root

 % cat .python-version 
3.8.6

if I run just python from the console in the project root, it starts the correct interpreter

 % python
Python 3.8.6 (default, May  4 2021, 09:31:45) 
[GCC 10.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 

that's also true for IDEA terminal - it runs 3.8.6. But PANTS plugin complains about the python version.

2021-05-06 11:26:22,750 [  46140]   INFO - pants.model.SimpleExportResult - Exit code 1 
2021-05-06 11:26:22,750 [  46140]   INFO - pants.model.SimpleExportResult - �[31mNo valid Python interpreter found. For `pants_version = "1.30.0"`, Pants requires Python 3.6, 3.7, or 3.8 to run. Please check that a valid interpreter is installed and on your $PATH.�[0m

However,

~ % pyenv global
3.8.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions