9

I am try to run code

sh run.sh

and it showed me the error

File "/anaconda3/envs/_galaxy_/lib/python3.6/site-packages/filelock/__init__.py", line 8
    from __future__ import annotations
    ^
SyntaxError: future feature annotations is not defined

I saw some solutions indicated that I need to update my python version, but I am in a python verion 3.9.7.

(py39) KedeMacBook-Pro:~ ke$ python --version
Python 3.9.7

However, in the error code it showed a python veriosn of 3.6. So, I am not sure where went wrong. Why it is not using the python envrionment that I have? Please help, thank you.

keee
  • 93
  • 1
  • 1
  • 3

1 Answers1

17

Based on the error, it looks like your code is using Python 3.6 and not Python 3.9. This import is available starting from Python 3.7. Check run.sh to make sure it is referencing the right python interpreter.

I'd also recommend using a virtual env using the python version you require and running your script inside that.

niranjan94
  • 754
  • 1
  • 8
  • 28