“Error loading wordnet: <urlopen error [Errno 23] Host is unreachable”, I got this error, I tried different internet connection, but did not work, any other ideas?
Thanks!
“Error loading wordnet: <urlopen error [Errno 23] Host is unreachable”, I got this error, I tried different internet connection, but did not work, any other ideas?
Thanks!
Did you try it directly in a Python script, separate from Jupyter?
Unless it gives different results in those two situations, this isn’t pertinent to this forum.
You may want to check out the issues page of the package.
For example, what you are showing looks related to this current ongoing open issue here (dated Sep 4 2025).
If this had been an issue that was pertinent to here, you’d be needing to supply more details. For example, we don’t know what code triggered this. Please check out Getting good answers to your questions and follow that as suggestions for your next post.
Hi I am using the lite browser version, JupyterLite
Here shows that presently Pyodide uses version 3.9.1. The issue I indicated previously said version 3.9.1 has the issue it won’t load wordnet.
You can get a version that works with 3.9.2 by going to the JupyterLab GitHub here and clicking on ‘launch binder’ badge you see just below there in the README. The temporary session will spin up on the remote machine connection and you’ll want to start a new notebook with the typical ipykernel. (The one to launch with the ipykernel should be the first tile on the leftmost sude in the launcher pane.)
Then make a new cell in this new notebook and run the following:
%pip install nltk
As shown here on the page for this package at PyPI at present, that will give your the version 3.9.2 because you have an ipykernel and are getting 3.9.2.
(You can verify you got version 3.9.2 by running %pip list and you’ll see for the nltk line: nltk 3.9.2.)
Then restart the kernel and run the following code in a new cell:
import nltk
nltk.download('wordnet')
That will run and you’ll see the following:
[nltk_data] Downloading package wordnet to /home/jovyan/nltk_data...
True
Instead of the following that you presently see when you do the same from starting up JupyterLite using the ‘try lite now’ badge here:
[nltk_data] Error loading wordnet: <urlopen error [Errno 23] Host is
[nltk_data] unreachable>
False