JamSpell icon indicating copy to clipboard operation
JamSpell copied to clipboard

MacOS + pip3 - can non install JamSpell: swigBinary is not None

Open TimurNurlygayanov opened this issue 6 years ago • 7 comments

Hi, I'm trying to install JamSpell with pip3 and get the following errors:

pip3 install jamspell
Collecting jamspell
  Using cached https://files.pythonhosted.org/packages/5a/16/0a808e926a835604007066085cb2183b337694a06240a99945b31fa14f27/jamspell-0.0.11.tar.gz
Building wheels for collected packages: jamspell
  Running setup.py bdist_wheel for jamspell ... error
  Complete output from command /usr/local/opt/python/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/l0/8196y31x399cm0zp73bfbxzr0000gn/T/pip-install-mrz_20rv/jamspell/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /private/var/folders/l0/8196y31x399cm0zp73bfbxzr0000gn/T/pip-wheel-gfrba271 --python-tag cp37:
  running bdist_wheel
  running build
  running build_ext
  building '_jamspell' extension
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/private/var/folders/l0/8196y31x399cm0zp73bfbxzr0000gn/T/pip-install-mrz_20rv/jamspell/setup.py", line 73, in <module>
      include_package_data=True,
    File "/usr/local/lib/python3.7/site-packages/setuptools/__init__.py", line 143, in setup
      return distutils.core.setup(**attrs)
    File "/usr/local/Cellar/python/3.7.2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/usr/local/Cellar/python/3.7.2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 966, in run_commands
      self.run_command(cmd)
    File "/usr/local/Cellar/python/3.7.2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/usr/local/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 188, in run
      self.run_command('build')
    File "/usr/local/Cellar/python/3.7.2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/usr/local/Cellar/python/3.7.2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/private/var/folders/l0/8196y31x399cm0zp73bfbxzr0000gn/T/pip-install-mrz_20rv/jamspell/setup.py", line 33, in run
      self.run_command('build_ext')
    File "/usr/local/Cellar/python/3.7.2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/usr/local/Cellar/python/3.7.2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/usr/local/Cellar/python/3.7.2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/command/build_ext.py", line 339, in run
      self.build_extensions()
    File "/usr/local/Cellar/python/3.7.2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/command/build_ext.py", line 448, in build_extensions
      self._build_extensions_serial()
    File "/usr/local/Cellar/python/3.7.2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/command/build_ext.py", line 473, in _build_extensions_serial
      self.build_extension(ext)
    File "/usr/local/Cellar/python/3.7.2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/command/build_ext.py", line 505, in build_extension
      sources = self.swig_sources(sources, ext)
    File "/usr/local/Cellar/python/3.7.2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/command/build_ext.py", line 596, in swig_sources
      swig = self.swig or self.find_swig()
    File "/private/var/folders/l0/8196y31x399cm0zp73bfbxzr0000gn/T/pip-install-mrz_20rv/jamspell/setup.py", line 45, in find_swig
      assert swigBinary is not None
  AssertionError

TimurNurlygayanov avatar Jan 24 '19 09:01 TimurNurlygayanov

You need to install swig3 here After extract run

./swig-3.0.12/configure && make && make install

It worked for me!

Raphencoder avatar Feb 20 '19 15:02 Raphencoder

Just installed JamSpell and had some problems with that on MacOS 10.15.4. For me it was useful to add the following line in setup.py file after import file:

os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.9'

I used the branch tryFixMacInstall of JamSpell.

MikhailYeka avatar Apr 10 '20 10:04 MikhailYeka

Try to install brew from macports: brew install swig@3

bakwc avatar Sep 30 '20 23:09 bakwc

Just FYI, brew install swig@3 didn't work for me. It looked like swig3 had been installed, but the system couldn't find it.

The solution above (manually installing swig-3.0.12) worked for me. 🙂

MacOS 12.4 on M1 Mac

suhara avatar Jun 11 '22 18:06 suhara

Hm.. swig from brew should work, I'll check

bakwc avatar Sep 19 '22 16:09 bakwc

You need to install swig3 here After extract run

./swig-3.0.12/configure && make && make install

It worked for me!

This link may work better to download swig.tar.gz

If you don't have sudo permission: ./swig-3.0.12/configure --prefix="/mnt/working/path/" && make && make install

xihajun avatar Nov 05 '22 21:11 xihajun

I have encountered the same problem with Apple Silicon.

ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

abbasovalex avatar Mar 18 '23 16:03 abbasovalex