Atom run python3 instead of python2

Hello, Im super new at python. I have 2 python installed in my machine its python2 and python3 . When i tried run atom with CTRL + SHIFT + B & ALT + X it’s only works in file that written python2.

Here my code:

when i open this project there is error said i should install pyls 0.19 i actually dont know what is used for but my i saw pyls 0.16 by pip3 list, but idk why the error message disappear now. And btw what is hydrogen used for ? So how to run it as python3 ? should i configure any files or install package ? thx anyway.

I’ve dealt with the headache of two python version being installed. I’m pretty sure that if you have both installed “python” will run version 2 and “python3” will run python3. Check to see if your shortcut is connected to the right command.

If I were you, though, I would nuke all your python installations and just run a fresh python 3 install. You don’t want to learn a bunch of python 2 syntax that doesn’t work in python 3 since that is really what is being used at this point by python developers unless they are supporting legacy systems.

1 Like

Looking at your syntax error, here’s what’s going on. pandas.read_csv default encoding is ascii but your csv file has characters in it that aren’t supported by ascii.

you need to add the encoding parameter and set the value to something that includes as the characters in your file.

Here’s a list of values you can use:

thx for the advice. I actually want remove python2 bcoz dont used it anymore in college. Btw i already found package atom-python-run, so atom able to run syntax in pic.

Idk about pandas.read_csv but it run normally in vscode.

and then u said

Check to see if your shortcut is connected to the right command.

How to check it ? thx anyway

You would look in the path variable to see which bin folder python is pointing to.

:slight_smile: