Problems running f strings

I’m having issue with running F strings code when I run python in the command line. Instead of python 3.7 it will run 3.5 and I have check the paths in the system setting in the environment variables and the show the path is 3.7. i have to run commands py -3.7 to run python 3.7. I cannot delete 3.5 through programs and Features should i delete the python 3.5 folder not sure if i should do that though. Any suggestion, I tried google it but not any help.

Python 3.5 doesn’t have f-strings so that’s why it doesn’t work. I also just type python3.7 to run everything, so just keep doing that and don’t remove anything. You’d have to totally uninstall all python and anaconda installs then install Python again for you to fix it and that’s too much work.

Thanks. It just my nosetests keeps failing in ex51 because its running py 3.5, is there a way to run the nosetest in 3.7 manually.

File “C:\Users\gtanke\pydir\gothonweb\”, line 14
greeting = f"{greet}, {name}"
SyntaxError: invalid syntax

Try this:

python3.7 -m "nose"
1 Like

Thanks!!! That worked.

1 Like