OSError Traceback (most recent call last)
Cell In[3], line 6
4 import torch.optim as optim
5 from torch.utils.data import Dataset, DataLoader
----> 6 import gluonnlp as nlp
7 import numpy as np
8 import pandas as pd
File /opt/anaconda3/lib/python3.11/site-packages/gluonnlp/init.py:23
1 # coding: utf-8
2
3 # Licensed to the Apache Software Foundation (ASF) under one
(...)
19
20 # pylint: disable=wildcard-import
21 """NLP toolkit."""
---> 23 from . import loss
24 from . import data
25 from . import embedding
File /opt/anaconda3/lib/python3.11/site-packages/gluonnlp/loss/init.py:23
1 # coding: utf-8
2
3 # Licensed to the Apache Software Foundation (ASF) under one
(...)
19
20 # pylint: disable=wildcard-import
21 """NLP loss."""
---> 23 from .activation_regularizer import
24 from .loss import
25 from .label_smoothing import *
File /opt/anaconda3/lib/python3.11/site-packages/gluonnlp/loss/activation_regularizer.py:25
21 """Language model RNN loss."""
23 all = ['ActivationRegularizationLoss', 'TemporalActivationRegularizationLoss']
---> 25 from mxnet.gluon.loss import Loss
28 class ActivationRegularizationLoss(Loss):
29 r"""Computes Activation Regularization Loss. (alias: AR)
30
31 The formulation is as below:
(...)
56 The axis that represents mini-batch.
57 """
File /opt/anaconda3/lib/python3.11/site-packages/mxnet/init.py:24
21 """MXNet: a concise, fast and flexible framework for deep learning."""
22 from future import absolute_import
---> 24 from .context import Context, current_context, cpu, gpu, cpu_pinned
25 from . import engine
26 from .base import MXNetError
File /opt/anaconda3/lib/python3.11/site-packages/mxnet/context.py:24
22 import warnings
23 import ctypes
---> 24 from .base import classproperty, with_metaclass, _MXClassPropertyMetaClass
25 from .base import _LIB
26 from .base import check_call
File /opt/anaconda3/lib/python3.11/site-packages/mxnet/base.py:214
212 version = libinfo.version
213 # library instance of mxnet
--> 214 _LIB = _load_lib()
216 # type definitions
217 mx_int = ctypes.c_int
File /opt/anaconda3/lib/python3.11/site-packages/mxnet/base.py:205, in _load_lib()
203 """Load library by searching possible path."""
204 lib_path = libinfo.find_lib_path()
--> 205 lib = ctypes.CDLL(lib_path[0], ctypes.RTLD_LOCAL)
206 # DMatrix functions
207 lib.MXGetLastError.restype = ctypes.c_char_p
OSError: dlopen(/opt/anaconda3/lib/python3.11/site-packages/mxnet/libmxnet.so, 0x0006): tried: '/opt/anaconda3/lib/python3.11/site-packages/mxnet/libmxnet.so' (not a mach-o file), '/System/Volumes/Preboot/Cryptexes/OS/opt/anaconda3/lib/python3.11/site-packages/mxnet/libmxnet.so' (no such file), '/opt/anaconda3/lib/python3.11/site-packages/mxnet/libmxnet.so' (not a mach-o file)
import gluonnlp as nlp 에서 에러가 나네요
OSError Traceback (most recent call last) Cell In[3], line 6 4 import torch.optim as optim 5 from torch.utils.data import Dataset, DataLoader ----> 6 import gluonnlp as nlp 7 import numpy as np 8 import pandas as pd
File /opt/anaconda3/lib/python3.11/site-packages/gluonnlp/init.py:23 1 # coding: utf-8 2 3 # Licensed to the Apache Software Foundation (ASF) under one (...) 19 20 # pylint: disable=wildcard-import 21 """NLP toolkit.""" ---> 23 from . import loss 24 from . import data 25 from . import embedding
File /opt/anaconda3/lib/python3.11/site-packages/gluonnlp/loss/init.py:23 1 # coding: utf-8 2 3 # Licensed to the Apache Software Foundation (ASF) under one (...) 19 20 # pylint: disable=wildcard-import 21 """NLP loss.""" ---> 23 from .activation_regularizer import 24 from .loss import 25 from .label_smoothing import *
File /opt/anaconda3/lib/python3.11/site-packages/gluonnlp/loss/activation_regularizer.py:25 21 """Language model RNN loss.""" 23 all = ['ActivationRegularizationLoss', 'TemporalActivationRegularizationLoss'] ---> 25 from mxnet.gluon.loss import Loss 28 class ActivationRegularizationLoss(Loss): 29 r"""Computes Activation Regularization Loss. (alias: AR) 30 31 The formulation is as below: (...) 56 The axis that represents mini-batch. 57 """
File /opt/anaconda3/lib/python3.11/site-packages/mxnet/init.py:24 21 """MXNet: a concise, fast and flexible framework for deep learning.""" 22 from future import absolute_import ---> 24 from .context import Context, current_context, cpu, gpu, cpu_pinned 25 from . import engine 26 from .base import MXNetError
File /opt/anaconda3/lib/python3.11/site-packages/mxnet/context.py:24 22 import warnings 23 import ctypes ---> 24 from .base import classproperty, with_metaclass, _MXClassPropertyMetaClass 25 from .base import _LIB 26 from .base import check_call
File /opt/anaconda3/lib/python3.11/site-packages/mxnet/base.py:214 212 version = libinfo.version 213 # library instance of mxnet --> 214 _LIB = _load_lib() 216 # type definitions 217 mx_int = ctypes.c_int
File /opt/anaconda3/lib/python3.11/site-packages/mxnet/base.py:205, in _load_lib() 203 """Load library by searching possible path.""" 204 lib_path = libinfo.find_lib_path() --> 205 lib = ctypes.CDLL(lib_path[0], ctypes.RTLD_LOCAL) 206 # DMatrix functions 207 lib.MXGetLastError.restype = ctypes.c_char_p
File /opt/anaconda3/lib/python3.11/ctypes/init.py:376, in CDLL.init(self, name, mode, handle, use_errno, use_last_error, winmode) 373 self._FuncPtr = _FuncPtr 375 if handle is None: --> 376 self._handle = _dlopen(self._name, mode) 377 else: 378 self._handle = handle
OSError: dlopen(/opt/anaconda3/lib/python3.11/site-packages/mxnet/libmxnet.so, 0x0006): tried: '/opt/anaconda3/lib/python3.11/site-packages/mxnet/libmxnet.so' (not a mach-o file), '/System/Volumes/Preboot/Cryptexes/OS/opt/anaconda3/lib/python3.11/site-packages/mxnet/libmxnet.so' (no such file), '/opt/anaconda3/lib/python3.11/site-packages/mxnet/libmxnet.so' (not a mach-o file)