473,224 Members | 1,965 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,224 software developers and data experts.

Python Problem

Hi,

The line:

import enchant

works perfectly OK when I call a Python progrma (sp.py) from IDLE
(WInXP). When I try to run it ftom the command line (python sp.py) the
response is:

Traceback (most recent call last):
File "sp.py", line 3, in <module>
import enchant
ImportError: No module named enchant

Searching my computer (the whole of drive c:\) I could not find ANY
file called enchant.*.

Does anyone know what is wrong?

Thanks

((:-() Meir
Sep 8 '07 #1
6 3950
On Fri, 2007-09-07 at 21:58 -0400, Wiseman wrote:
Hi,

The line:

import enchant

works perfectly OK when I call a Python progrma (sp.py) from IDLE
(WInXP). When I try to run it ftom the command line (python sp.py) the
response is:

Traceback (most recent call last):
File "sp.py", line 3, in <module>
import enchant
ImportError: No module named enchant
Enchant is a third-party package that must have been installed
separately. The most likely cause for the problem you're seeing is that
you have two Python versions on your computer, one with Enchant
installed, one without, and you're running the GUI of the one that does
have Enchant and the command line of the one that doesn't.

It's possible that the cause is something else, but to eliminate the
most obvious solution, run "import sys; print sys.version" in each
Python and check if they differ.
Searching my computer (the whole of drive c:\) I could not find ANY
file called enchant.*.
It is not necessary to have a file called enchant-dot-anything anywhere
on your disk to successfully import enchant as a module. The module
could also be built-in, stored inside a zip-file, or it could be a
package.

In enchant's case, it's a package, i.e. somewhere on your disk you'll
find a folder called "enchant" with a file "__init__.py" inside it.

To find out quickly where "enchant" is, simply issue "print enchant"
after importing enchant in IDLE. It'll tell you from where the module
was loaded.

HTH,

--
Carsten Haese
http://informixdb.sourceforge.net
Sep 8 '07 #2
Carsten.

I want to thank you for your help. I could not check this until this
morning. Now that I checked your answer - THANK YOU.
I do have 2 installations of Python on my machine. Once I called
Python with a full path - my program orked as expected.

Meir
Sep 11 '07 #3

Hi,

OK - it works in WindowsXP.
I installed "enchant" on my SuSE 10.0 (using YAST).
The enchant Suse package looks like a general Linux package, not a
Python specific.

Running the program in Python I am getting the same error message from
the line: "import enchant".

ImportError: No module named enchant

What am I missing?

Thanks

((:-() Meir

>Hi,

The line:

import enchant

works perfectly OK when I call a Python progrma (sp.py) from IDLE
(WInXP). When I try to run it ftom the command line (python sp.py) the
response is:

Traceback (most recent call last):
File "sp.py", line 3, in <module>
import enchant
ImportError: No module named enchant

Searching my computer (the whole of drive c:\) I could not find ANY
file called enchant.*.

Does anyone know what is wrong?

Thanks

((:-() Meir
Sep 11 '07 #4
On 2007-09-11, Wiseman <mi****@disney.comwrote:
>
Hi,

OK - it works in WindowsXP.
I installed "enchant" on my SuSE 10.0 (using YAST).
The enchant Suse package looks like a general Linux package, not a
Python specific.
You'd seem to be right judging by this web-page:
http://www.novell.com/products/linux...x/enchant.html

As you can see, there is no file installed at a path with "python" in it.
What am I missing?
Python bindings to the library perhaps?
You may be more lucky with an enchant-dev package (if it exists). I am however
not a Suse user and not an echant user (well, not from my Python code at least).
Albert

Sep 12 '07 #5
On Wed, 12 Sep 2007 09:09:02 +0200, A.T.Hofkamp wrote:
On 2007-09-11, Wiseman <mi****@disney.comwrote:
>>
Hi,

OK - it works in WindowsXP.
I installed "enchant" on my SuSE 10.0 (using YAST).
The enchant Suse package looks like a general Linux package, not a
Python specific.

You'd seem to be right judging by this web-page:
http://www.novell.com/products/linux...x/enchant.html

As you can see, there is no file installed at a path with "python" in it.
>What am I missing?

Python bindings to the library perhaps?
You may be more lucky with an enchant-dev package (if it exists). I am however
not a Suse user and not an echant user (well, not from my Python code at least).
PyEnchant seems to be an independent project:

http://pyenchant.sourceforge.net/

So there is either an extra package for SuSE or the OP has to build it
himself.

Ciao,
Marc 'BlackJack' Rintsch
Sep 12 '07 #6
Marc,

Thank you.

I followed the instructions in given at pyenchant.sourceforge.net and
got the application to work.

((;-))
Meir

PS: My challenge now is to port the application to Redhat.
I already know that Redhat is missing the pyenchant package - I hope
the same installation process will solve the problem. It also missing
"threading" and this will be the story for another day.

I'll appreciate any hint from anyone who've already solved such a
problem

M
----------------------------------------------------------------

On 12 Sep 2007 07:33:52 GMT, Marc 'BlackJack' Rintsch <bj****@gmx.net>
wrote:
>On Wed, 12 Sep 2007 09:09:02 +0200, A.T.Hofkamp wrote:
>On 2007-09-11, Wiseman <mi****@disney.comwrote:
>>>
Hi,

OK - it works in WindowsXP.
I installed "enchant" on my SuSE 10.0 (using YAST).
The enchant Suse package looks like a general Linux package, not a
Python specific.

You'd seem to be right judging by this web-page:
http://www.novell.com/products/linux...x/enchant.html

As you can see, there is no file installed at a path with "python" in it.
>>What am I missing?

Python bindings to the library perhaps?
You may be more lucky with an enchant-dev package (if it exists). I am however
not a Suse user and not an echant user (well, not from my Python code at least).

PyEnchant seems to be an independent project:

http://pyenchant.sourceforge.net/

So there is either an extra package for SuSE or the OP has to build it
himself.

Ciao,
Marc 'BlackJack' Rintsch
Sep 12 '07 #7

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

Similar topics

14
by: David MacQuigg | last post by:
I am starting a new thread so we can avoid some of the non-productive argument following my earlier post "What is good about Prothon". At Mr. Hahn's request, I will avoid using the name "Prothon"...
68
by: Lad | last post by:
Is anyone capable of providing Python advantages over PHP if there are any? Cheers, L.
112
by: mystilleef | last post by:
Hello, What is the Pythonic way of implementing getters and setters. I've heard people say the use of accessors is not Pythonic. But why? And what is the alternative? I refrain from using them...
0
by: Kurt B. Kaiser | last post by:
Patch / Bug Summary ___________________ Patches : 417 open ( -6) / 3565 closed (+12) / 3982 total ( +6) Bugs : 960 open ( -3) / 6498 closed (+19) / 7458 total (+16) RFE : 266 open...
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

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.