简体   繁体   中英

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.

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.

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