问题
I would like to use the fastai library to perform text processing. First job I installed the fastai library. I used to import it later, but without any code, it only gives an import error.
I am using Python 3.5.2
My OS Ubuntu 16.04
asd.py
from fastai import *
from fastai.text import *
output:
Traceback (most recent call last):
File "/home/ali/Desktop/asd.py", line 2, in <module>
from fastai.text import *
File "/home/ali/Desktop/env/lib/python3.5/site-packages/fastai/text.py", line 8
re_tok = re.compile(f'([{string.punctuation}“”¨«»®´·º½¾¿¡§£₤‘’])')
^
SyntaxError: invalid syntax
Just downloading and importing the library may be caused by this error.
来源:https://stackoverflow.com/questions/53517455/i-get-the-error-while-importing-the-fastai-library-after-install