How to set up PyCharm and point to run Python3.9.5 interpreter?

I have Python 3.9.5 installed in my Linux machine (elementary os). How to point the interpret to run the 3.9.5? I do not find python version from File->Settings->Project:project-name. Then I choose Python Interpreter. I do not see Python 3.9.5. I only see Python 3.6. When I click the wheel symbol, I see a pop up screen for 

1.) Virtualenv Environment
2.) Conda Environment
3.) System Inpterpreter
4.) Pipenv Environment

I choose Virtualenv Environment, then Base interpreter. But the OK button is greyed.

Basically I do not know the difference among the four points above and how to set the various python versions for a test file. 

0
3 comments

Please see https://www.jetbrains.com/help/pycharm/configuring-python-interpreter.html

Basically, if you haven't created any virtual environments and just installed python, you should select System interpreter and point it to python executable.

0

I use pycharm for Windows. I installed everything as recommended but I checked all boxes for python installation. Now I get this error:

C:\Users\om\AppData\Local\Programs\Python\Python39\python.exe C:/Users/omar/AppData/Local/Programs/Python/Python39
C:\Users\om\AppData\Local\Programs\Python\Python39\python.exe: can't find '__main__' module in 'C:\\Users\\om\\AppData\\Local\\Programs\\Python\\Python39'

Process finished with exit code 1

I have ananonda also installed. So when I go to settings and change python interpreter I see that the base for Venv is base "C:/Users ...App/Data/...." when I click on the three dots, to the right, the ok select anaconda or the python on "C:/Users/..AppData/..", the ok button does not appear, it is greyed. when I go to system I can change it to ananconda but after hitting ok, and coming back to see if it changed it still defaults to "C:/users/..AppData/ or to no interpreter. I used it once it worked but now something I did it does not. I am using the pycharm Professional the trail version. Does this mean all functionalities do not work unless subscription. My free trial has 27 days left. 

Thanks for the response. Since I have to do a school project I do not know I have less time to figure out. I have spent a few days to figure out.  also when I try to remove ./uninstall I get issue like no python installed. But I see it on control panel, I have 3.8, and 3.9. Thanks

 

0

Omaridris5315

can't find '__main__' module in

That can mean incorrect run/debug configuration. Try right-clicking on the file and select "Run <file_name>"

I have ananonda also installed. So when I go to settings and change python interpreter I see that the base for Venv is base "C:/Users ...App/Data/...."

Have you tried to select "<conda_env>/bin/python" file? Could you show a screenshot?

0

Please sign in to leave a comment.