Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Python script runs in Windows but not Linux

I just started using Linux a couple days ago, I had the script running fine but made a lot of changes today

I tried to run the script using

python3 ds_main.py

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

which returns the error:

Traceback (most recent call last):
  File "ds_main.py", line 14 in <module>
    import cmd_main
  File "/home/me/discord/cmd_main.py", line 190
    match action:
          ^
SyntaxError: invalid syntax

In this section I did add a match case clause, which the error seems to be pointing to?

I checked the version using python3 --version which returns Python 3.8.10

Not sure what else!

>Solution :

Python 3.8.10 does not support structural pattern matching (match keyword). You need Python >= 3.10.x

https://peps.python.org/pep-0634/

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading