-1

I have 2 VM sessions.

In the VM session A, the script won't run right if I type python

if I don't put python3 the error I get

but if I type python3 it's fine.

When I move this script to my other VM session B, and I try to run it, it is spitting out (what I think) are issues with quotes. (VM B is a virtualized environment and I don't usually have to type python3 .. but I did it both ways here and it still fails.

the error I get in VMWare B no matter what I do

VM A is running python Python 2.7.15rc1 -- at least if I type python on the terminal it says that ... which confuses me why I type python3 to get it to run. I see code that is using some of the new formatting in python strings.

VM B is running Python 3.5.2.

Can someone help, I am a rookie here big time ... so appreciate it!

Paul Z
  • 53
  • 6
  • 5
    Your errors are not images, they are text. Please copy them as such in your question. – Jongware Nov 22 '18 at 15:03
  • On your VM A `python` is running Python 2.7 and `python3` is running some version of Python 3.x. The two are not comparable. – r.ook Nov 22 '18 at 15:03
  • 3
    f-strings were introduced in Python 3.6 but you're running Python 3.5 on VMWare B. – Matthias Nov 22 '18 at 15:03

1 Answers1

1

Your script uses f-strings (the f"\t- {house_1[0]} sq feet" thing), which were only added to Python in version 3.6. You need to either upgrade the Python 3 version on VM B or else rewrite your code to no longer use f-strings.

jwodder
  • 54,758
  • 12
  • 108
  • 124