简体   繁体   中英

Different Python versions from PyCharm and python.exe

I have installed Anaconda3 and PyCharm. When I go in PyCharm to File - Settings - Project Interpreter I see that Python 3.6 is used and its path goes to Anaconda. But when I go this path (C:\\ProgramData\\Anaconda3) and start python.exe I see Python is 3.7.3 version. Why the Python versions are different when there is the same Python?

This is because what you see in PyCharm is just a name, that usually originates from the python executable. If you change the executable (python path), the name is not updated. You can edit it with the pencil icon. The same goes for the virtualenv between brackets.
Hope this helps!

You have two python compiler installed in your machine. Go to settings - project Interpreter. Then add a new compiler (1 in the image) by specifying that it's an anaconda based (2 in the image). put conda.exe path in conda executable. Here is a screenshot of my setup. I use this setup when I don't want to work with virtual env and want to directly use my conda env.

在此处输入图片说明

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