pycharm doesn't see python3.7 interpreter

21,308

Solution 1

You will need to add the interpreter to the list of available interpreters.

Use which python to find out the path of the interpreter, then in the Settings > Project Interpreter > Add > System Interpreter window hit the "..." button and add that interpreter. (The screenshot below is from macOS, but it should be the same on Linux.)

enter image description here

Solution 2

I had the same issues with Pycharm Community Edition 2020.1, Linux Mint 19.3.

For reasons I don't know, the Flatpak version, which is only provided in Linux Mint's repositories can't see and access most of the directories which are beyond the user's home.

Pycharm 2020.1 Flatpak comes with a Python 3.7 interpreter, which seems to live in the virtual environment, located in the user's home. I tried to change for the default python3 compiler of Linux Mint 19.3, which is version 3.6 and lives in /usr/bin - no chance, neither by navigating with Pycharm's file browser, nor by copy and paste to the path field.

Strangely also most of the directories e.g. below /usr/lib weren't displayed.

I then installed Pycharm via a ppa (alternative package repository for some Linux flavors), to be specific this one

Voilà! Any installed interpreter is accessible and can be selected.

Solution 3

if you already have 3.7 installed. right click and run Pycharm as admin. then it should display, and install the new packages.

Solution 4

How do you launch Python3.7 in terminal? For example, you use python3.7 to launch.

Then you can which python3.7 to find where it is.

And then add that path to your Pycharm's Python Interpreter.

Share:
21,308
Cépagrave
Author by

Cépagrave

Updated on August 16, 2022

Comments

  • Cépagrave
    Cépagrave almost 2 years

    I'm using Pycharm Community 2018.1.4 on Linux Mint 19 Tara Xfce.

    It works well with Python 3.5 interpreter. I installed Python 3.7 to be the default Python interpreter on the system.

    python -V command returns Python 3.7.0b3 I would like to use Python 3.7 in Pycharm.

    I've tried :

    which python
    

    /usr/bin/python

    which python3.7
    

    /usr/local/bin/python3.7

    When I go to File > Settings > Project and Interpreter > Add and there is no /usr/local folder and there is no python3.7 in /usr/bin

    I can cd to /usr/local/bin folder in the terminal, but Pycharm just can't. I restarted, uninstalled/reinstalled Pycharm, refreshed its inner browser, restarted my pc. Nothing changed.

    What am I missing?

  • Cépagrave
    Cépagrave almost 6 years
    Thanks for your answer, I tried that already: the path is /usr/bin/. But there's no python3.7 there
  • AKX
    AKX almost 6 years
    If you run python -V and get "Python 3.7.0b3", a subsequent which python will tell you which executable prints that. It doesn't need to be called python3.7 to be Python 3.7.
  • Cépagrave
    Cépagrave almost 6 years
    My nose tells me that my problem is more related to linux than to pycharm ... Don't you think ?
  • AKX
    AKX almost 6 years
    If you can cd /usr/local/bin in a shell, it does exist. PyCharm is a little slow on the uptake for file system changes on occasion though – there's that refresh button in the file/directory selector in PyCharm...
  • Cépagrave
    Cépagrave almost 6 years
    I can cd /usr/local/bin from shell and python3.7 is there. I refreshed the file/directory selector, restarted the pc, refreshed again, and still can't reach /usr/local/bin from Pycharm ...
  • Cépagrave
    Cépagrave almost 6 years
    So basically my problem is: Pycharm is unable to reach the '/usr/local/' folder. It doesn't appear in the File/Open browser either.