ImportError: The 'enchant' C library was not found. Please install it via your OS package manager, or use a pre-built binary wheel from PyPI
Asked Answered
D

11

26

The question is why I see the error message in the title when trying to import enchant. I am using Win64.

Durden answered 1/4, 2015 at 2:34 Comment(0)
D
13

I found the answer in this GitHub page.

In a nutshell, they have not shipped a wheel for the win_amd64 platform yet.

Durden answered 1/4, 2015 at 2:34 Comment(3)
Is there a resolution to this? I am trying to use it on Windows 10 64 bit in Python 3.4.3.Audet
One solution is to use 32 bit python 2.7 as mentioned in #37771727 (Indigo8's answer)Interviewee
Is there a solution to this for Pydroid? Trying to write on my mobile but its returning this errorFiddlehead
C
23

On Ubuntu, run sudo apt-get install libenchant1c2a

Candlefish answered 2/5, 2015 at 20:38 Comment(3)
Didn't work. This did sudo apt-get install python-enchantReadability
For search engines. Related answers are often what people are actually looking for. Seems like stack exchange is more for looking for general answers than a user-to-user siteAndesite
sudo apt-get install -y python3-enchant worked for me.Trident
D
13

I found the answer in this GitHub page.

In a nutshell, they have not shipped a wheel for the win_amd64 platform yet.

Durden answered 1/4, 2015 at 2:34 Comment(3)
Is there a resolution to this? I am trying to use it on Windows 10 64 bit in Python 3.4.3.Audet
One solution is to use 32 bit python 2.7 as mentioned in #37771727 (Indigo8's answer)Interviewee
Is there a solution to this for Pydroid? Trying to write on my mobile but its returning this errorFiddlehead
U
13

Resolved: On Win7-64 I ran

pip3 install pyenchant==1.6.6

which seems to be the latest version of PyEnchant that still shipped with Win-64 binaries. Newer versions did not install for me, but this one did.

Udela answered 29/1, 2019 at 9:24 Comment(0)
D
7

For amazon ubuntu instance use.

yum install enchant 

and then

pip install pyenchant
Desantis answered 5/4, 2018 at 20:32 Comment(2)
Ubuntu doesn't have yum.Manamanacle
for Ubuntu use sudo apt-get install enchant and then pip install pyenchantThump
B
3

For me, the problem I ran into was that I had an old version of pip. I installed the latest version and was able to download the pyenchant library.

pip install -U pip

Blooper answered 13/11, 2015 at 19:42 Comment(0)
R
2

On Windows x64 I've solved this problem as follows:

  • Click link https://pypi.org/project/pyenchant/#files and download pyenchant-2.0.0.win32.exe
  • Launch it and while installing it using the installation wizard you must specify your python interpreter location which in my case is:

C:\Users\Asus\AppData\Local\Programs\Python\Python36\python.exe

Important:İf you use python32 interpreter you must specify this location:

C:\Users\Asus\AppData\Local\Programs\Python\Python36-32\python.exe

if you use python 3.5 interpreter version your location may be like this:

C:\Users\Asus\AppData\Local\Programs\Python\Python35\python.exe

and finish the installation. Pip commands will work now for other dependency packages.

Roddie answered 30/10, 2018 at 9:58 Comment(0)
P
2

To run with docker on AWS:

  1. With apt-get:
sudo apt-get update
sudo apt-get -y install enchant-2
  1. With apt:
sudo apt update
sudo apt -y install enchant-2

Thank you

Plumbum answered 30/11, 2022 at 2:13 Comment(0)
G
1

On MacOS, you can install it via brew:

brew install enchant
pip install pyenchant
Giraud answered 16/5, 2021 at 8:50 Comment(0)
O
0

I have fix the bugs on the colab.

!apt update !apt install enchant --fix-missing

After fixing the missing files, you could run the enchant.

Overstride answered 3/2, 2022 at 20:53 Comment(1)
while these instructions may solve the problem, it doesn't explain why or how it answers the question. Please include an explanation for your code, as that really helps to improve the quality of your post. Remember that you are answering the question for readers in the future, and those people might not know the reasons for your code suggestion.Tobitobiah
L
0

Steps to resolve are as-

  1. First check the operating system as below
import platform
os_type = platform.system()
print(f"Operating System Type: {os_type}")
  1. If it is Linux, Then take sudo update and follow next steps, for other operating system follow this page https://pyenchant.github.io/pyenchant/install.html
!sudo apt-get update
  1. Then check which libenchant version is in apt-cache
!apt-cache search libenchant
  1. Insall libenchant accordingly
!sudo apt-get install libenchant{cached_version}
Loram answered 29/1, 2024 at 11:15 Comment(0)
S
0

Updated answer for Debian-based Linux distros (e.g. Ubuntu) as of May 2024

The package name for enchant is now named "enchant-2". If you're running into this issue on a Ubuntu, its flavors, or a similar Debian-based distro, ensure you have tried sudo apt-get install enchant-2.

Soppy answered 20/5, 2024 at 0:53 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.