Import d2lzh_Pytorch reports an error, importerror: DLL load failed while importing_ Torchtext: the specified program cannot be found.!! OMG
Guide Package
import torch
import torch.nn as nn
import numpy as np
import pandas as pd
import sys
sys.path.append("..")
import d2lzh_pytorch as d2l
The error is as follows:
ImportError: DLL load failed while importing _torchtext: The specified program could not be found.
The solution is as follows:
#check torch version
import torch
print(torch.__version__) #1.7.0
#Download the torchtext that corresponds to your own torch version
pip install torchtext==0.6
Perfect solution to the problem