比如像下面这样的:
To install these along with pydantic:
pip install pydantic[email]
# or
pip install pydantic[dotenv]
# or just
pip install pydantic[email,dotenv]
Of course, you can also install these requirements manually with pip install email-validator and/or pip install.
使用了中括号 pydantic[dotenv]
但是我在终端中想要安装的时候,遇到了下面的问题:
─➤ pip install pydantic[dotenv]
zsh: no matches found: pydantic[dotenv]
zsh会将
[]
,^
等这些在bash中并不会被视为元字符的特殊字符进行扩展,所以你必须在前面加上\
转义或者加上引号''
让zsh识别成普通字符串