Kivy: enchant - ImportError: No module named 'enchant'

Created on 21 Jun 2018  路  4Comments  路  Source: kivy/kivy

Versions

  • Python: 3.5.2
  • OS:Windows-10-10.0.17134-SP0
  • Kivy:v1.10.0
  • Kivy installation method: follow wiki of kivy on github

Description

Try to build an app on windows, I'll encounter the problem "No module named 'enchant'"
so I search everwhere I can only to find out that the maintainer have gave up on supporting pyenchant for windows x64 + python3.5 (here)
So I need to know is there any way to fix this for win10x64+python35

PS: this will not affect the function for my current build, it runs normally, but it is still a potential problem for further development ....

Code and Logs

```build log
PS G:\Projects\LANRemoteController\LANRemoteController> python3 -m PyInstaller .\server.spec
3730 INFO: PyInstaller: 3.3.1
3730 INFO: Python: 3.5.2
3730 INFO: Platform: Windows-10-10.0.17134-SP0
3730 INFO: UPX is not available.
[INFO ] [Logger ] Record log in C:\UsersAdministrator.kivy\logs\kivy_18-06-21_7.txt
4246 INFO: [Logger ] Record log in C:\UsersAdministrator.kivy\logs\kivy_18-06-21_7.txt
[INFO ] [Kivy ] v1.10.0
4246 INFO: [Kivy ] v1.10.0
[INFO ] [Python ] v3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:18:55) [MSC v.1900 64 bit (AMD64)]
4261 INFO: [Python ] v3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:18:55) [MSC v.1900 64 bit (AMD64)]
4261 INFO: Extending PYTHONPATH with paths
['G:\Projects\LANRemoteController\LANRemoteController',
'G:\Projects\LANRemoteController\LANRemoteController']
4261 INFO: checking Analysis
4386 INFO: Building because inputs changed
4386 INFO: Initializing module dependency graph...
4465 INFO: Initializing module graph hooks...
4543 INFO: Analyzing base_library.zip ...
11617 INFO: running Analysis out00-Analysis.toc
13446 INFO: Caching module hooks...
13539 INFO: Analyzing Server\ServerUI.py
18071 INFO: Loading module hooks...
18071 INFO: Loading module hook "hook-kivy.py"...
[INFO ] [Factory ] 194 symbols loaded
18290 INFO: [Factory ] 194 symbols loaded
[INFO ] [Logger ] Record log in C:\UsersAdministrator.kivy\logs\kivy_18-06-21_8.txt
[INFO ] [Kivy ] v1.10.0
[INFO ] [Python ] v3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:18:55) [MSC v.1900 64 bit (AMD64)]
[INFO ] [Image ] Providers: img_tex, img_dds, img_sdl2, img_gif (img_pil, img_ffpyplayer ignored)
[INFO ] [Logger ] Record log in C:\UsersAdministrator.kivy\logs\kivy_18-06-21_9.txt
[INFO ] [Kivy ] v1.10.0
[INFO ] [Python ] v3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:18:55) [MSC v.1900 64 bit (AMD64)]
[INFO ] [AudioGstplayer] Using Gstreamer 1.10.2.0
[INFO ] [Audio ] Providers: audio_gstplayer, audio_sdl2 (audio_ffpyplayer ignored)
[INFO ] [Image ] Providers: img_tex, img_dds, img_sdl2, img_gif (img_pil, img_ffpyplayer ignored)
[INFO ] [Camera ] Provider: opencv
[INFO ] [Clipboard ] Provider: winctypes
[INFO ] [Factory ] 194 symbols loaded
[INFO ] [OSC ] using for socket
[INFO ] [Window ] Provider: sdl2
[INFO ] [GL ] Using the "OpenGL" graphics system
[INFO ] [GL ] GLEW initialization succeeded
[INFO ] [GL ] Backend used
[INFO ] [GL ] OpenGL version
[INFO ] [GL ] OpenGL vendor
[INFO ] [GL ] OpenGL renderer
[INFO ] [GL ] OpenGL parsed version: 4, 6
[INFO ] [GL ] Shading version
[INFO ] [GL ] Texture max size <16384>
[INFO ] [GL ] Texture max units <32>
[INFO ] [Window ] auto add sdl2 input provider
[INFO ] [Window ] virtual keyboard allowed, single mode, docked
[CRITICAL] [Spelling ] Unable to find any valuable Spelling provider.
enchant - ImportError: No module named 'enchant'
File "F:\Develop\Python35\lib\site-packages\kivy\core__init__.py", line 59, in core_select_lib
fromlist=[modulename], level=0)
File "F:\Develop\Python35\lib\site-packages\kivy\core\spelling\spelling_enchant.py", line 6, in
import enchant

[INFO ] [Text ] Provider: sdl2
[INFO ] [VideoGstplayer] Using Gstreamer 1.10.2.0
[INFO ] [Video ] Provider: gstplayer
33203 WARNING: Hidden import "fired." not found!
33797 WARNING: Hidden import "34" not found!
33797 WARNING: Hidden import "Analysing..." not found!
33797 WARNING: Hidden import "files" not found!
35141 WARNING: Hidden import "log" not found!
35234 WARNING: Hidden import "Purge" not found!
35297 WARNING: Hidden import "finished!" not found!
38000 INFO: Processing pre-find module path hook distutils
45919 INFO: Processing pre-find module path hook site
45935 INFO: site: retargeting to fake-dir 'F:\Develop\Python35\lib\site-packages\PyInstaller\fake-modules'
53387 INFO: Excluding import 'twisted'
53392 INFO: Removing import of twisted from module kivy.support
53394 INFO: Import to be excluded not found: '_tkinter'
53395 INFO: Import to be excluded not found: 'tkinter'
53395 INFO: Loading module hook "hook-sysconfig.py"...
53478 INFO: Loading module hook "hook-xml.dom.domreg.py"...
53489 INFO: Loading module hook "hook-pydoc.py"...
53514 INFO: Loading module hook "hook-lib2to3.py"...
53736 INFO: Loading module hook "hook-xml.py"...
53740 INFO: Loading module hook "hook-xml.etree.cElementTree.py"...
53744 INFO: Loading module hook "hook-distutils.py"...
53764 INFO: Loading module hook "hook-setuptools.py"...
53826 INFO: Loading module hook "hook-docutils.py"...
60180 INFO: Loading module hook "hook-cv2.py"...
60203 INFO: Loading module hook "hook-pygments.py"...
63610 INFO: Loading module hook "hook-pkg_resources.py"...
64177 INFO: Processing pre-safe import module hook win32com
64400 INFO: Loading module hook "hook-numpy.core.py"...
64494 INFO: Loading module hook "hook-encodings.py"...
64569 INFO: Loading module hook "hook-pywintypes.py"...
64748 INFO: Loading module hook "hook-win32com.py"...
65425 INFO: Loading module hook "hook-pythoncom.py"...
65662 INFO: Looking for ctypes DLLs
65721 INFO: Analyzing run-time hooks ...
65728 INFO: Including run-time hook 'pyi_rth_kivy.py'
65732 INFO: Including run-time hook 'pyi_rth_pkgres.py'
65767 INFO: Including run-time hook 'pyi_rth_win32comgenpy.py'
65788 INFO: Including run-time hook 'pyi_rth_gstreamer.py'
65796 INFO: Including run-time hook 'pyi_rth_multiprocessing.py'
65821 INFO: Looking for dynamic libraries
80778 INFO: Looking for eggs
80778 INFO: Using Python library F:\Develop\Python35\python35.dll
80793 INFO: Found binding redirects:
[]
80809 INFO: Warnings written to G:\Projects\LANRemoteController\LANRemoteControllerbuild\server\warnserver.txt
80965 INFO: Graph cross-reference written to G:\Projects\LANRemoteController\LANRemoteControllerbuild\server\xref-server.html
81059 INFO: checking PYZ
81074 INFO: Building because toc changed
81074 INFO: Building PYZ (ZlibArchive) G:\Projects\LANRemoteController\LANRemoteControllerbuild\server\out00-PYZ.pyz
82788 INFO: Building PYZ (ZlibArchive) G:\Projects\LANRemoteController\LANRemoteControllerbuild\server\out00-PYZ.pyz completed successfully.
82819 INFO: checking PKG
82819 INFO: Building because G:\Projects\LANRemoteController\LANRemoteControllerbuild\server\out00-PYZ.pyz changed
82819 INFO: Building PKG (CArchive) out00-PKG.pkg
83022 INFO: Building PKG (CArchive) out00-PKG.pkg completed successfully.
83022 INFO: Bootloader F:\Develop\Python35\lib\site-packages\PyInstallerbootloader\Windows-64bit\run.exe
83022 INFO: checking EXE
83022 INFO: Building because manifest changed
83022 INFO: Building EXE from out00-EXE.toc
83085 INFO: Appending archive to EXE G:\Projects\LANRemoteController\LANRemoteControllerbuild\server\server.exe
83335 INFO: Building EXE from out00-EXE.toc completed successfully.
83335 INFO: checking Tree
83335 INFO: Building Tree because out00-Tree.toc is non existent
83335 INFO: Building Tree out00-Tree.toc
83366 INFO: checking Tree
83366 INFO: Building Tree because out01-Tree.toc is non existent
83366 INFO: Building Tree out01-Tree.toc
83382 INFO: checking COLLECT
WARNING: The output directory "G:\Projects\LANRemoteController\LANRemoteController\dist\server" and ALL ITS CONTENTS will be REMOVED! Continue? (y/n)y
134948 INFO: Removing dir G:\Projects\LANRemoteController\LANRemoteController\dist\server
135183 INFO: Building COLLECT out00-COLLECT.toc
136730 INFO: Updating manifest in C:\UsersAdministratorAppData\Roaming\pyinstallerbincache00_py35_64bit\cv2.cv2.pyd
136730 INFO: Updating resource type 24 name 2 language 1033
137402 INFO: Updating manifest in C:\UsersAdministratorAppData\Roaming\pyinstallerbincache00_py35_64bit\numpy.core.multiarray.pyd
137402 INFO: Updating resource type 24 name 2 language 1033
137464 INFO: Updating manifest in C:\UsersAdministratorAppData\Roaming\pyinstallerbincache00_py35_64bit\numpy.core.umath.pyd
137464 INFO: Updating resource type 24 name 2 language 1033
137511 INFO: Updating manifest in C:\UsersAdministratorAppData\Roaming\pyinstallerbincache00_py35_64bit\numpy.core.multiarray_tests.pyd
137511 INFO: Updating resource type 24 name 2 language 1033
137574 INFO: Updating manifest in C:\UsersAdministratorAppData\Roaming\pyinstallerbincache00_py35_64bit\numpy.random.mtrand.pyd
137574 INFO: Updating resource type 24 name 2 language 1033
137605 INFO: Updating manifest in C:\UsersAdministratorAppData\Roaming\pyinstallerbincache00_py35_64bit\numpy.fft.fftpack_lite.pyd
137605 INFO: Updating resource type 24 name 2 language 1033
137636 INFO: Updating manifest in C:\UsersAdministratorAppData\Roaming\pyinstallerbincache00_py35_64bit\numpy.linalg._umath_linalg.pyd
137636 INFO: Updating resource type 24 name 2 language 1033
137683 INFO: Updating manifest in C:\UsersAdministratorAppData\Roaming\pyinstallerbincache00_py35_64bit\numpy.linalg.lapack_lite.pyd
137683 INFO: Updating resource type 24 name 2 language 1033
141453 INFO: Building COLLECT out00-COLLECT.toc completed successfully.
```

documentation Windows Python3 Regression

Most helpful comment

Try:
pip install --user pyenchant
Make sure you are using correct pip version. Namely, it could be pip2 or pip3.

All 4 comments

There is no alternative provider for spell checking right now, I'm afraid.

The only thing you can do there right now is to try to build it yourself. Or maybe wait until someone steps up as a maintainer of that library. :slightly_frowning_face:

Try:
pip install --user pyenchant
Make sure you are using correct pip version. Namely, it could be pip2 or pip3.

@jarzab3

C:\Users\wei.wu>python --version
Python 3.7.0

C:\Users\wei.wu>python -m pip install pyenchant
Collecting pyenchant
  Cache entry deserialization failed, entry ignored
  Using cached https://files.pythonhosted.org/packages/9e/54/04d88a59efa33fefb88
133ceb638cdf754319030c28aadc5a379d82140ed/pyenchant-2.0.0.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\wei.wu\AppData\Local\Temp\pip-install-uv4cb_xy\pyenchant\se
tup.py", line 212, in <module>
        import enchant
      File "C:\Users\wei.wu\AppData\Local\Temp\pip-install-uv4cb_xy\pyenchant\en
chant\__init__.py", line 92, in <module>
        from enchant import _enchant as _e
      File "C:\Users\wei.wu\AppData\Local\Temp\pip-install-uv4cb_xy\pyenchant\en
chant\_enchant.py", line 145, in <module>
        raise ImportError(msg)
    ImportError: The 'enchant' C library was not found. Please install it via yo
ur OS package manager, or use a pre-built binary wheel from PyPI.

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\wei.wu\A
ppData\Local\Temp\pip-install-uv4cb_xy\pyenchant\

This won't work, and the enchant C library need to be compiled by myself, or wait for someone else as @dolang mentioned above. But still, thanks for help.

Well, we cannot handle the fact that enchant is not supported anymore. So the only thing would be to add a warning in the documentation, and work on use another library.

Was this page helpful?
0 / 5 - 0 ratings