python - 安装后导入 fastai 库时出现错误
问题描述
我想使用 fastai 库来执行文本处理。第一份工作我安装了 fastai 库。我以前导入它,但没有任何代码,它只给出一个导入错误。
我正在使用 Python 3.5.2
我的操作系统 Ubuntu 16.04
asd.py
from fastai import *
from fastai.text import *
输出:
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
只是下载和导入库可能是由这个错误引起的。
解决方案
推荐阅读
- python - AttributeError:模块 'keras.utils' 没有属性 'Sequence'
- mongodb - 如何在猫鼬中使用 findOneAndUpdate
- c - Linux system() 返回 -1,ERRNO = 10 无子进程
- sql - SQL 在 3 个表之间选择 - 无法转换为 int 错误
- javascript - 打印数字 - setTimeout JavaScript
- c# - Visual Studio 中的 C# WSDL 请求/响应
- python - 使用一个输入参数在python中序列化二叉树
- javascript - 将无符号字节值转换为从 -1 到 1 的浮点数
- c# - 在 C# 中的数组中查找子数组
- c# - 如果变量仍然为空,则迭代到孩子