I've tried to upgrade Python version to 3.8 and when I want to add the interpreter in PyCharm I get the following:
I have no idea as to why this happens. When I type python -V in the command prompt I get Python 3.8.3.
EDIT: Python version actually is updated but PyCharm still marks the code as if the version is 3.
Related
I have recently installed debian10 and VSCode. I have checked the currently installed version of python on my system is and it is python 3.7.3. This is also the version returned by python --version. When running python --version in terminal of vscode it returns python 3.8.8. When i go to select the python interpreter it only gives me options to select python 3.8.8. If i specify the path python i am currently using(python 3.7.3) it does not recognize it, or the other python versions there, which include python 2.7 etc. The path is /usr/bin . please help, ive been strugling with this for so long now.
Have you tried updating to the newest version of python? If not, try and it should work fine after.
I am new to linux and somewhat new to python. I am trying to follow a tutorial that is using python 3.9, however I was using python 3.4.2. Once I realized I was out of date I downloaded python 3.9.0 and when I run
python -V
in the terminal is stats Python 3.9.0, but the python shell is still running 3.4.2
I am not sure how to change the python version for the current project, or start a new project in python 3.9 when I click on python 3 idle in the menu.
It still states python 3.4.2
So how do I get the python idle to run python 3.9.0 and not 3.4.2?
I have 2 python versions in my PC as well (2 and 3), what I usually do is to add an alias in ~/.bashrc, and update it when needed, example alias python="python3" or if python2 is needed just alias python="python2"
I'm new to Python and in web dev and now I'am learning to code with Django. I'm using Atom IDE and I installed Anaconda with Python version 3.8.2.
But when I activate VirtualEnvironment and type Atom console "python" and see that the installed version of python is 2.7.16.
When I use terminal and do the same thing I see that python version is 3.8.2 as expected.
If I type in Atom "Python3" I see 3.7.3 version for some reason.
Why in Atom I see such old version of Python?
And why if I type python3 I see version lower than I installed and why in the terminal I see what I expect but not i Atom?
Thank you!
How can I use Python 3.7 in my command line?
My Python interpreter is active on Python 3.7 and my python.pythonPath is /usr/local/bin/python3, though my Python version in my command line is 2.7. I've already installed Python 3.7 on my mac.
lorenzs-mbp:Python lorenzkort$ python --version
Python 2.7.13
If you open tab "Terminal" in your VSCode then your default python is called (in your case python2).
If you want to use python3.7 try to use following command:
python3 --version
Or just type the full path to the python folder:
/usr/local/bin/python3 yourscript.py
In case you want to change default python interpreter, then follow this accepted anwser: How to set Python's default version to 3.x on OS X?
You should use python3 instead of python for running any commands you want to run then it will use the python3 version interpreter.
Also if you are using pip then use pip3.
Hope this helps.
This gives you a complete guide in setting up Visual Studio code for python
Getting Started with Python in VS Code
Without root access, how do I change the default Python from 3.5 to 2.7 for my specific user? Would like to know how to run Python scripts with Python 2 as well.
If I start up Python by running simply python then it runs 3.5.2. I have to specifically run python2 at the terminal prompt to get a version of python2 up.
If I run which python, then /data/apps/anaconda3/bin/python gets returned and I believe Python 2.7 is under /usr/bin/python.
This is on CentOS if that helps clarify anything
You can add
alias python=python2.7
to your .bashrc file in home folder
If you are looking to change the python interpreter in anaconda from 3.5 to 2.7 for the user, try the command conda install python=2.7