JamSpell
JamSpell copied to clipboard
MacOS + pip3 - can non install JamSpell: swigBinary is not None
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
You need to install swig3 here After extract run
./swig-3.0.12/configure && make && make install
It worked for me!
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.
Try to install brew from macports:
brew install swig@3
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
Hm.. swig from brew should work, I'll check
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
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)