东莞免费做网站公司,怎么注册个人工作室,小微企业注册流程及费用,黄冈网站建设哪家快些Pytorch 、 torchtext和Python之间有严格的对应关系#xff1a; 在命令窗中安装torchtext
pip install torchtext
注意这种安装方式#xff0c;在pytorch版本与python版本不兼容时动会自动更新并安装pytorchcpu版本#xff0c;安装的新版本pytorch可能会不兼容。慎用。 …Pytorch 、 torchtext和Python之间有严格的对应关系 在命令窗中安装torchtext
pip install torchtext
注意这种安装方式在pytorch版本与python版本不兼容时动会自动更新并安装pytorchcpu版本安装的新版本pytorch可能会不兼容。慎用。
如果不兼容会产生以下报错
C:\Users\刘鸿逸pip install torchtext
Collecting torchtextUsing cached torchtext-0.16.2-cp310-cp310-win_amd64.whl.metadata (7.5 kB)
Requirement already satisfied: tqdm in d:\python\lib\site-packages (from torchtext) (4.66.1)
Requirement already satisfied: requests in d:\python\lib\site-packages (from torchtext) (2.28.1)
Collecting torch2.1.2 (from torchtext)Using cached torch-2.1.2-cp310-cp310-win_amd64.whl.metadata (26 kB)
Requirement already satisfied: numpy in d:\python\lib\site-packages (from torchtext) (1.23.0)
Collecting torchdata0.7.1 (from torchtext)Using cached torchdata-0.7.1-cp310-cp310-win_amd64.whl.metadata (13 kB)
Requirement already satisfied: filelock in d:\python\lib\site-packages (from torch2.1.2-torchtext) (3.12.0)
Requirement already satisfied: typing-extensions in d:\python\lib\site-packages (from torch2.1.2-torchtext) (4.5.0)
Requirement already satisfied: sympy in d:\python\lib\site-packages (from torch2.1.2-torchtext) (1.12)
Requirement already satisfied: networkx in d:\python\lib\site-packages (from torch2.1.2-torchtext) (2.8.8)
Requirement already satisfied: jinja2 in d:\python\lib\site-packages (from torch2.1.2-torchtext) (3.1.2)
Collecting fsspec (from torch2.1.2-torchtext)Using cached fsspec-2023.12.2-py3-none-any.whl.metadata (6.8 kB)
Requirement already satisfied: urllib31.25 in d:\python\lib\site-packages (from torchdata0.7.1-torchtext) (1.26.12)
Requirement already satisfied: charset-normalizer3,2 in d:\python\lib\site-packages (from requests-torchtext) (2.1.1)
Requirement already satisfied: idna4,2.5 in d:\python\lib\site-packages (from requests-torchtext) (3.4)
Requirement already satisfied: certifi2017.4.17 in d:\python\lib\site-packages (from requests-torchtext) (2022.9.24)
Requirement already satisfied: colorama in d:\python\lib\site-packages (from tqdm-torchtext) (0.4.6)
Requirement already satisfied: MarkupSafe2.0 in d:\python\lib\site-packages (from jinja2-torch2.1.2-torchtext) (2.1.1)
Requirement already satisfied: mpmath0.19 in d:\python\lib\site-packages (from sympy-torch2.1.2-torchtext) (1.3.0)
Using cached torchtext-0.16.2-cp310-cp310-win_amd64.whl (1.9 MB)
Downloading torch-2.1.2-cp310-cp310-win_amd64.whl (192.3 MB)---------------------------------------- 192.3/192.3 MB 920.3 kB/s eta 0:00:00
Downloading torchdata-0.7.1-cp310-cp310-win_amd64.whl (1.3 MB)---------------------------------------- 1.3/1.3 MB 716.2 kB/s eta 0:00:00
Downloading fsspec-2023.12.2-py3-none-any.whl (168 kB)---------------------------------------- 169.0/169.0 kB 635.0 kB/s eta 0:00:00
Installing collected packages: fsspec, torch, torchdata, torchtextAttempting uninstall: torchFound existing installation: torch 2.0.1Uninstalling torch-2.0.1:Successfully uninstalled torch-2.0.1WARNING: Failed to remove contents in a temporary directory D:\Python\Lib\site-packages\~orch.You can safely remove it manually.
ERROR: pips dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
torchvision 0.15.2 requires torch2.0.1, but you have torch 2.1.2 which is incompatible.
Successfully installed fsspec-2023.12.2 torch-2.1.2 torchdata-0.7.1 torchtext-0.16.2 ERROR: pips dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. torchvision 0.15.2 requires torch2.0.1, but you have torch 2.1.2 which is incompatible. Successfully installed fsspec-2023.12.2 torch-2.1.2 torchdata-0.7.1 torchtext-0.16.2
已经成功安装了torchtext和其依赖的torch 2.1.2版本但这个版本的torch与系统中已安装的torchvision 0.15.2版本不兼容因为torchvision 0.15.2要求torch版本为2.0.1。 使用以下命令解决版本问题
pip install torch2.0.1