简体   繁体   中英

PyCharm doesn't list python3.6

My PyCharm doesn't list the latest interpreter when choosing the location of the interpreter in the preferences.

version: PyCharm 2018.1

operating system: Linux Mint 19 Cinnamon

$ ls /usr/bin/python3*
/usr/bin/python3    /usr/bin/python3.5m  /usr/bin/python3.6-config  /usr/bin/python3.6-dbg-config  /usr/bin/python3.6dm-config  /usr/bin/python3.6m-config  /usr/bin/python3-dbg         /usr/bin/python3dm         /usr/bin/python3m
/usr/bin/python3.5  /usr/bin/python3.6   /usr/bin/python3.6-dbg     /usr/bin/python3.6dm           /usr/bin/python3.6m          /usr/bin/python3-config     /usr/bin/python3-dbg-config  /usr/bin/python3dm-config  /usr/bin/python3m-config

However, in the preferences of PyCharm, python3.6 is not selectable: 在此处输入图片说明

When I try to select python3 from the list it still uses python3.5 even though python3 is a symbolic link to python3.6:

$ readlink -f /usr/bin/python3
/usr/bin/python3.6

In PyCharm, I still get:

>> import sys
>> print(sys.version)
3.5.2 (default, Jan 10 2018, 06:17:28) 

I am configuring the [Default Settings...] and also the project settings under [Settings...]

If it is not appearing in pycharm then you can add the path. Go to Settings>Project interpreter>Virtualenv Environment>...>add. Then make sure you path to python 3.6. Also do the same thing for System interpreter. Hope that helps

Updating PyCharm might do the trick.

The Software Manager of Linux Mint currently only offers PyCharm 2018.1, but you can get a newer version by following the instruction from the official website .

Installing the latest version of PyCharm using snap might help.

$ sudo apt install snapd
$ sudo snap install pycharm-community --classic

I had the exact same issue with the Community version where I couldn't add virtual environments based on other versions of Python than 2, 3, and 3.8.

Upgrading to the Professional version magically solved the problem for me.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM