473,756 Members | 5,156 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2147
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:\Progr am 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
993
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 ignored" Now the package works fine until I tried to use that in Apache via CGI. Apache is showing a Server Error and the error_logs states that: from
2
3602
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 Visual Basic .net standard 2003. Not installing Visual Basic at the WinXP SP1A level - was the only way I found that I could install WinXPSP2. My computer was purchased with WinXP SP1 Professional. I also have Norton Internet Security and Norton...
7
5021
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. I created the websetup and built the MSI, have the bundled version. Copied to webserver and ran Websetup.msi. Said I had to remove old version, which I did, then reran WebSetup.msi and keeps giving me this error. "The installer was interrupted...
2
418
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 Visual Basic .net standard 2003. Not installing Visual Basic at the WinXP SP1A level - was the only way I found that I could install WinXPSP2. My computer was purchased with WinXP SP1 Professional. I also have Norton Internet Security and Norton...
0
9462
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9287
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10046
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9857
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8723
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7259
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
3817
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3369
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2677
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.