【发布时间】:2019-10-03 19:39:16
【问题描述】:
我正在使用 mac 操作系统。 我使用了“brew install hunspell”,但现在我在制作“pip3 install hunspell”时遇到了问题
我试过 brew install gcc 但它并没有解决问题。
MacBook:bin $ pip3 install hunspell
Collecting hunspell
Using cached https://files.pythonhosted.org/packages/e5/fe/cfc4dfd92c3a37c34d2806d5b84f9981bf3520db20149f8ee1a61f6fc69d/hunspell-0.5.5.tar.gz
Building wheels for collected packages: hunspell
Building wheel for hunspell (setup.py) ... error
Complete output from command /usr/local/opt/python/bin/python3.7 -u -c"importsetuptools,tokenize;__file__='/private/var/folders/ty/z084vbf1137qft9t7nmh8xr0000gq/T/pip-install-f00b6zkx/hunspell/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/ty/z084vbf1137cqft9t7nmh8xr0000gq/T/pip-wheel-ssonog8z --python-tag cp37:
running bdist_wheel
running build
running build_ext
building 'hunspell' extension
creating build
creating build/temp.macosx-10.14-x86_64-3.7
/usr/local/bin/gcc-6 -DNDEBUG -g -fwrapv -O3 -Wall -Wa,-q -D_LINUX -I/usr/local/Cellar/hunspell/1.6.2/include/hunspell -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c hunspell.cpp -o build/temp.macosx-10.14-x86_64-3.7/hunspell.o -Wall
unable to execute '/usr/local/bin/gcc-6': No such file or directory
error: command '/usr/local/bin/gcc-6' failed with exit status 1
----------------------------------------
Failed building wheel for hunspell
Running setup.py clean for hunspell
Failed to build hunspell
Installing collected packages: hunspell
Running setup.py install for hunspell ... error
Complete output from command /usr/local/opt/python/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/ty/z084vbf1137cqft9t7nmh8xr0000gq/T/pip-install-f00b6zkx/hunspell/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/ty/z084vbf1137cqft9t7nmh8xr0000gq/T/pip-record-7vvt6eyr/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_ext
building 'hunspell' extension
creating build
creating build/temp.macosx-10.14-x86_64-3.7
/usr/local/bin/gcc-6 -DNDEBUG -g -fwrapv -O3 -Wall -Wa,-q -D_LINUX -I/usr/local/Cellar/hunspell/1.6.2/include/hunspell -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c hunspell.cpp -o build/temp.macosx-10.14-x86_64-3.7/hunspell.o -Wall
unable to execute '/usr/local/bin/gcc-6': No such file or directory
error: command '/usr/local/bin/gcc-6' failed with exit status 1
----------------------------------------
Command "/usr/local/opt/python/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/ty/z084vbf1137cqft9t7nmh8xr0000gq/T/pip-install-f00b6zkx/hunspell/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/ty/z084vbf1137cqft9t7nmh8xr0000gq/T/pip-record-7vvt6eyr/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/ty/z084vbf1137cqft9t7nmh8xr0000gq/T/pip-install-f00b6zkx/hunspell/
【问题讨论】:
-
这是通过 brew 安装 gcc 得到的输出吗?显然,没有 brew 期望的
/usr/local/bin/gcc-6文件。 -
@VladislavIvanishin 这是我制作“pip3 install hunspell”时的输出。我已经完成了“brew install hunspell”,并且成功了。是的,没有 gcc-6(但我有 gcc-9),但我不知道如何将其重定向到 gcc-9 ? (至少有可能吗?)
标签: macos gcc pip homebrew hunspell