Hans Long
Hans Long

Reputation: 23

Change the interpreter in Pycharm but it doesn't work

I changed the interpreter from python3.7 to python2.7 in Pycharm. But after I did this process, the interpreter showed success but actually, when I ran the code it still was running with python 3.7.

The interpreters are set from the anaconda.

This image shows that I have changed the external library to Python 2.7 but when I test the type of python in the terminal, it still shows in Python3.7.

I really struggle about this problem, hope someone can help me.

Upvotes: 2

Views: 757

Answers (1)

Pavel Karateev
Pavel Karateev

Reputation: 8495

I believe you face a known PyCharm bug: PY-23417. IDE fails to activate the conda environment in the terminal so you end up running Python 2 instead of 3 by python executable as it uses the first interpreter in PATH.

Try PyCharm 2019.1 EAP build. The problem should be resolved there.

Upvotes: 1

Related Questions