我正在尝试在 Pycharm 上运行我的程序,但出现以下错误
C:\Users\I323017\AppData\Local\Continuum\anaconda3\pythonw.exe C:/Users/I323017/PycharmProjects/question_answering_kinnal/src/main.py
Traceback (most recent call last):
File "C:/Users/I323017/PycharmProjects/question_answering_kinnal/src/main.py", line 1, in <module>
from src.dataset import PrepareDataSet
File "C:\Users\I323017\PycharmProjects\question_answering_kinnal\src\dataset.py", line 7, in <module>
from transformers import SquadExample, squad_convert_examples_to_features, AlbertTokenizer
File "C:\Users\I323017\AppData\Local\Continuum\anaconda3\lib\site-packages\transformers\__init__.py", line 23, in <module>
from .benchmark_utils import (
File "C:\Users\I323017\AppData\Local\Continuum\anaconda3\lib\site-packages\transformers\benchmark_utils.py", line 14, in <module>
from .file_utils import is_tf_available, is_torch_available
File "C:\Users\I323017\AppData\Local\Continuum\anaconda3\lib\site-packages\transformers\file_utils.py", line 38, in <module>
import torch
File "C:\Users\I323017\AppData\Local\Continuum\anaconda3\lib\site-packages\torch\__init__.py", line 81, in <module>
ctypes.CDLL(dll)
File "C:\Users\I323017\AppData\Local\Continuum\anaconda3\lib\ctypes\__init__.py", line 356, in __init__
self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found
Process finished with exit code 1
为什么我会OSError: [WinError 126] The specified module could not be found
在一切似乎都到位时得到。这是否与解释器有关?目前,我在 Pycharm 中使用我的 Conda 解释器
实际上,我有很多不需要的包,所以我做了一个conda clean --yes --all
,但我的 Pycharm 从那时起就无法工作。