473,379 Members | 1,317 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

pywordnet install problems

hello pythoneers,

I recently tried to install wordnet 2.0 and pywordnet on both an ubuntu
linux running python 2.4 and a winXP running activePython 2.4.1, and I
get the exact same error on both when I try to "from wordnet import *"
:

running install
error: invalid Python installation: unable to open
/usr/lib/python2.4/config/Makefile (No such file or directory)

Adding the directories and files in question (touch Makefile) makes the
install go through but (obviously) breaks the import of wordnet.py:
import wordnet

Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "wordnet.py", line 1348, in ?
N = Dictionary(NOUN, 'noun')
File "wordnet.py", line 799, in __init__
self.indexFile = _IndexFile(pos, filenameroot)
File "wordnet.py", line 945, in __init__
self.rewind()
File "wordnet.py", line 958, in rewind
if (line[0] != ' '):
IndexError: string index out of range

Is this pywordnet package abandoned, are there weird versioning issues,
or am I just extremely unlucky for the install to fail on two machines?

any help greatly appreciated,
vdrab.

Sep 30 '05 #1
4 2131
vdrab wrote:
hello pythoneers,

I recently tried to install wordnet 2.0 and pywordnet on both an ubuntu
linux running python 2.4 and a winXP running activePython 2.4.1, and I
get the exact same error on both when I try to "from wordnet import *"
:

running install
error: invalid Python installation: unable to open
/usr/lib/python2.4/config/Makefile (No such file or directory)

Adding the directories and files in question (touch Makefile) makes the
install go through but (obviously) breaks the import of wordnet.py:
import wordnet


Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "wordnet.py", line 1348, in ?
N = Dictionary(NOUN, 'noun')
File "wordnet.py", line 799, in __init__
self.indexFile = _IndexFile(pos, filenameroot)
File "wordnet.py", line 945, in __init__
self.rewind()
File "wordnet.py", line 958, in rewind
if (line[0] != ' '):
IndexError: string index out of range

Is this pywordnet package abandoned, are there weird versioning issues,
or am I just extremely unlucky for the install to fail on two machines?


Which version of WordNet do you have installed? I remember that when I
tried upgrading to the current version of WordNet, pywordnet broke. I
don't think the module is maintained very well; I've submitted a number
of bug reports and RFE patches and not had any of them responded to. If
I had the time, I'd pick up the project, but I don't at the moment...

STeVe
Sep 30 '05 #2
hello Steve,

I had WordNet 2.0 installed but just now I tried it with 1.7.1 as well
and the result was the same. It's a shame, glossing over the pywordnet
page really made me want to give it a try.
Are there any workarounds you can recommend ?
I had a quick look at the wordnet.py file, and it looks readable enough
to try and fiddle around with it, but if possible I'd like to avoid
having to mess with the source file.
Is there any other person / list I can ask for help on this?

thanks a lot.
vdrab.

Oct 1 '05 #3
vdrab wrote:
I had WordNet 2.0 installed but just now I tried it with 1.7.1 as well
and the result was the same. It's a shame, glossing over the pywordnet
page really made me want to give it a try.
Are there any workarounds you can recommend ?
What's your wordnet setup like? I have mine installed in:
C:\Program Files\WordNet\2.0
and I have an environment variable WNHOME set:
WNHOME=C:\Program Files\WordNet\2.0
That seems to work for me.
I had a quick look at the wordnet.py file, and it looks readable enough
to try and fiddle around with it, but if possible I'd like to avoid
having to mess with the source file.
Is there any other person / list I can ask for help on this?


Unfortunately, I wasn't able to find anyone else...

STeVe
Oct 3 '05 #4
Thanks, I already figured it out a few days ago.

In the wordnet.py file, just override the path (WNHOME and/or WNSEARCH)
to the wordnet 2.0directory that has the lexnames files etc... (on my
ubuntu box: '/usr/share/wordnet')
That seems to fix it, although python gives a few warnings at startup.
checking the web it seems this is a known issue.
Thanks for the help though... I didn't bother posting the solution as I
thought noone was interested anymore.

cheers,
vdrab.

Oct 4 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Gurpreet Sachdeva | last post by:
I am using pywordnet and when ever I import the package from wordnet import *, I get an error: "Exception exceptions.AttributeError: "DbfilenameShelf instance has no attribute 'writeback'" in ...
2
by: Ralph | last post by:
I used to have Visual Basic .net std. 2003 installed on WinXP SP1A. But I found it too hard to upgrade WinXP to SP2. Now, I do have WinXP SP2 installed, but I am having problems installing...
7
by: p | last post by:
WE had a Crystal 8 WebApp using vs 2002 which we upgraded to VS2003. I also have Crystal 9 pro on my development machine. The web app runs fine on my dev machine but am having problems deploying....
2
by: Ralph | last post by:
I used to have Visual Basic .net std. 2003 installed on WinXP SP1A. But I found it too hard to upgrade WinXP to SP2. Now, I do have WinXP SP2 installed, but I am having problems installing...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.