3

I was able to install pyenchant, using pip install pyenchant and brew install enchant. However, when I go to import enchant, I get the following error:

>>> import enchant
Traceback (most recent call last):
  File "<pyshell#1>", line 1, in <module>
    import enchant
  File "/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/enchant/__init__.py", line 92, in <module>
    from enchant import _enchant as _e
  File "/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/enchant/_enchant.py", line 121, in <module>
    prefix_dir.contents = c_char_p(e_dir)
TypeError: bytes or integer address expected instead of str instance
Adam_G
  • 7,337
  • 20
  • 86
  • 148

2 Answers2

1

In this other post (Pyenchant utils loading error), they suggested to install the C library in MacOS with homebrew (brew install enchant), for me it worked.

Community
  • 1
  • 1
J. Hs
  • 23
  • 4
0

in python 3 64 bit enchant doesn't exist its an old issue don't know why not getting resolved if its absolute required use python 32 bit that will solve it, it works fine.