Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9199891
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T22:38:30+00:00 2026-06-17T22:38:30+00:00

I’m on a mac, and I wanted to make a program to define a

  • 0

I’m on a mac, and I wanted to make a program to define a list of words for me. To this end I installed NLTK with following the instrctions at the official website for Mac/Unix machines. The numpy install failed, not sure if that affects anything. But anyways, working off some sample code from here I made a little simple program

from nltk.corpus import wordnet
print(wordnet)
word = raw_input("Words to define? \n")
for word in word.split():
    for synset in wordnet.synsets(word):
        print("lexical type:", synset.lexname)
        print ("Definition:", synset.definition)

The first time I did this, I got an error, and to fix it I ran the following code in python prompt

import nltk
nltk.download()

I installed almost all the packages (the one that didnt I dont think was relevant) and I ran the above code again. The problem is now I’m getting this error

Traceback (most recent call last):
  File "/Users/pipsqueaker/Documents/workspace/wordDefine/main/main.py", line 10, in <module>
    for synset in wordnet.synsets(word):
  File "/Library/Python/2.7/site-packages/nltk/corpus/util.py", line 68, in __getattr__
    self.__load()
  File "/Library/Python/2.7/site-packages/nltk/corpus/util.py", line 56, in __load
    except LookupError: raise e
LookupError: 
**********************************************************************
  Resource 'corpora/wordnet' not found.  Please use the NLTK
  Downloader to obtain the resource:  >>> nltk.download()
  Searched in:
    - '/Users/pipsqueaker/nltk_data'
    - '/usr/share/nltk_data'
    - '/usr/local/share/nltk_data'
    - '/usr/lib/nltk_data'
    - '/usr/local/lib/nltk_data'
**********************************************************************

I installed my nltk to the /usr/share/nltk_data directory, and I navigated to it in finder to make sure it was there, and it was. I’m using osx’s default python with grammar version of 2.7 in Eclipse’s pydev. Do you have any idea what could be causing the problem?

Also, I don’t think its an import error. I can do

import nltk 
print(nltk) #this runs nice

What can I do to fix this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T22:38:32+00:00Added an answer on June 17, 2026 at 10:38 pm

    I think this could be due to path issues. I work recommend using virtual envs and pip as standard when working with packages.

    Some great notes here: https://python-guide.readthedocs.org/en/latest/

    You also might want to try reinstalling even if your not sure it’s ‘relevant’. The error message maybe a general data not found one.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I would like to run a str_replace or preg_replace which looks for certain words
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
This could be a duplicate question, but I have no idea what search terms

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.