1
votes

enter image description hereI am attempting to install Gluonnlp to a sagemaker jupyter notebook. Im using the command !sudo pip3 install gluonnlp to install. Which is successful. However on import I get ModuleNotFoundError: No module named 'gluonnlp'

I got the same issue when attempting to install mxnet with pip in the same notebook. It was resolved when I conda installed mxnet instead. However conda install has not been working for gluonnlp as it cannot find the package. I can't seem to find a way to conda install gluonnlp. Any suggestions would be highly appreciated.

Here are some of the commands I have tried

!sudo pip3 install gluonnlp

!conda install gluonnlp --> Anaconda cant find the package in any channels

!conda install pip --y
!sudo pip3 install gluonnlp

!sudo pip3 install gluonnlp

!conda install -c conda-forge gluonnlp --y

All these commands on my import import warnings

warnings.filterwarnings('ignore')

import io
import random
import numpy as np
import mxnet as mx
import gluonnlp as nlp
from bert import data, model

result in the error

ModuleNotFoundError: No module named 'gluonnlp'
1
try : sudo -H pip3 install gluonnlp , "-H" give permission to all users to use module - itsvinayak
I just tried still doesn't recognize it. I have had this happen before in sagemaker notebooks and the only solution I have come to is using anaconda but the package is not there. I'm wondering if I can install with pip and then somehow have the anaconda recognize it - PDPDPDPD
try : "conda install -c conda-forge gluonnip" this will install it in anaconda for more read geeksforgeeks.org/python-add-packages-to-anaconda-environment - itsvinayak
I'm getting really weird issues where it still is not recognizing it - PDPDPDPD
I will but there really isn't much to share. It just has the import just doesn't recognize the module - PDPDPDPD

1 Answers

0
votes

this is as simple as creating a Jupyter notebook using the 'conda_mxnet_p36' kernel, and adding a cell containing:

!pip install gluonnlp