Colocando isso aqui para verificação adicional.
Eu tenho pythons instalados (2.7.10 e 3.4.3), então, por enquanto, meu 3.5b2 está instalado a partir do pacote mac (isso pode causar problemas com cabeçalhos, eu acho). osx 10.10.3; Xcode mais recente;
De qualquer forma, aqui está a configuração e os resultados (até agora):
e então, tente:
resulta em erro para sinalizador de compilação não existente (emite apenas um aviso quando instalado em 3.4.3 python)
(vhov) Yarkos-MacBook-Pro:hovercraft yak007$ python --version
Python 3.5.0b2
(vhov) Yarkos-MacBook-Pro:hovercraft yak007$ which python
/Users/yak007/workspace/hovercraft/env/vhov/bin/python
(vhov) Yarkos-MacBook-Pro:hovercraft yak007$ pip list
Cython (0.22)
docutils (0.12)
pip (7.0.3)
setuptools (17.1.1)
e a ação principal:
(vhov) Yarkos-MacBook-Pro:hovercraft yak007$ pip install watchdog
Collecting watchdog
Using cached watchdog-0.8.3.tar.gz
Collecting PyYAML>=3.10 (from watchdog)
Using cached PyYAML-3.11.tar.gz
Collecting argh>=0.24.1 (from watchdog)
Collecting pathtools>=0.1.1 (from watchdog)
Installing collected packages: PyYAML, argh, pathtools, watchdog
Running setup.py install for PyYAML
Running setup.py install for watchdog
Complete output from command /Users/yak007/workspace/hovercraft/env/vhov/bin/python3.5 -c "import setuptools, tokenize;__file__='/private/var/folders/z_/p0qs_dyn5w186pp5wym5c65c0000gp/T/pip-build-8i5b7kqd/watchdog/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/z_/p0qs_dyn5w186pp5wym5c65c0000gp/T/pip-jkl462at-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/yak007/workspace/hovercraft/env/vhov/include/site/python3.5/watchdog:
running install
running build
running build_py
creating build
creating build/lib.macosx-10.6-intel-3.5
creating build/lib.macosx-10.6-intel-3.5/watchdog
copying src/watchdog/__init__.py -> build/lib.macosx-10.6-intel-3.5/watchdog
copying src/watchdog/events.py -> build/lib.macosx-10.6-intel-3.5/watchdog
copying src/watchdog/version.py -> build/lib.macosx-10.6-intel-3.5/watchdog
copying src/watchdog/watchmedo.py -> build/lib.macosx-10.6-intel-3.5/watchdog
creating build/lib.macosx-10.6-intel-3.5/watchdog/observers
copying src/watchdog/observers/__init__.py -> build/lib.macosx-10.6-intel-3.5/watchdog/observers
copying src/watchdog/observers/api.py -> build/lib.macosx-10.6-intel-3.5/watchdog/observers
copying src/watchdog/observers/fsevents.py -> build/lib.macosx-10.6-intel-3.5/watchdog/observers
copying src/watchdog/observers/fsevents2.py -> build/lib.macosx-10.6-intel-3.5/watchdog/observers
copying src/watchdog/observers/inotify.py -> build/lib.macosx-10.6-intel-3.5/watchdog/observers
copying src/watchdog/observers/inotify_buffer.py -> build/lib.macosx-10.6-intel-3.5/watchdog/observers
copying src/watchdog/observers/inotify_c.py -> build/lib.macosx-10.6-intel-3.5/watchdog/observers
copying src/watchdog/observers/kqueue.py -> build/lib.macosx-10.6-intel-3.5/watchdog/observers
copying src/watchdog/observers/polling.py -> build/lib.macosx-10.6-intel-3.5/watchdog/observers
copying src/watchdog/observers/read_directory_changes.py -> build/lib.macosx-10.6-intel-3.5/watchdog/observers
copying src/watchdog/observers/winapi.py -> build/lib.macosx-10.6-intel-3.5/watchdog/observers
creating build/lib.macosx-10.6-intel-3.5/watchdog/tricks
copying src/watchdog/tricks/__init__.py -> build/lib.macosx-10.6-intel-3.5/watchdog/tricks
creating build/lib.macosx-10.6-intel-3.5/watchdog/utils
copying src/watchdog/utils/__init__.py -> build/lib.macosx-10.6-intel-3.5/watchdog/utils
copying src/watchdog/utils/bricks.py -> build/lib.macosx-10.6-intel-3.5/watchdog/utils
copying src/watchdog/utils/compat.py -> build/lib.macosx-10.6-intel-3.5/watchdog/utils
copying src/watchdog/utils/decorators.py -> build/lib.macosx-10.6-intel-3.5/watchdog/utils
copying src/watchdog/utils/delayed_queue.py -> build/lib.macosx-10.6-intel-3.5/watchdog/utils
copying src/watchdog/utils/dirsnapshot.py -> build/lib.macosx-10.6-intel-3.5/watchdog/utils
copying src/watchdog/utils/echo.py -> build/lib.macosx-10.6-intel-3.5/watchdog/utils
copying src/watchdog/utils/event_backport.py -> build/lib.macosx-10.6-intel-3.5/watchdog/utils
copying src/watchdog/utils/importlib2.py -> build/lib.macosx-10.6-intel-3.5/watchdog/utils
copying src/watchdog/utils/platform.py -> build/lib.macosx-10.6-intel-3.5/watchdog/utils
copying src/watchdog/utils/unicode_paths.py -> build/lib.macosx-10.6-intel-3.5/watchdog/utils
copying src/watchdog/utils/win32stat.py -> build/lib.macosx-10.6-intel-3.5/watchdog/utils
running egg_info
writing requirements to src/watchdog.egg-info/requires.txt
writing dependency_links to src/watchdog.egg-info/dependency_links.txt
writing top-level names to src/watchdog.egg-info/top_level.txt
writing src/watchdog.egg-info/PKG-INFO
writing entry points to src/watchdog.egg-info/entry_points.txt
warning: manifest_maker: standard file '-c' not found
reading manifest file 'src/watchdog.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.h' under directory 'src'
writing manifest file 'src/watchdog.egg-info/SOURCES.txt'
running build_ext
building '_watchdog_fsevents' extension
creating build/temp.macosx-10.6-intel-3.5
creating build/temp.macosx-10.6-intel-3.5/src
gcc-4.2 -fno-strict-aliasing -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -arch x86_64 -g -DWATCHDOG_VERSION_STRING="0.8.3" -DWATCHDOG_VERSION_MAJOR=0 -DWATCHDOG_VERSION_MINOR=8 -DWATCHDOG_VERSION_BUILD=3 -I/Users/yak007/workspace/hovercraft/env/vhov/include -I/Library/Frameworks/Python.framework/Versions/3.5/include/python3.5m -c src/watchdog_fsevents.c -o build/temp.macosx-10.6-intel-3.5/src/watchdog_fsevents.o -std=c99 -pedantic -Wall -Wextra -fPIC -Wno-error=unused-command-line-argument-hard-error-in-future
cc1: error: -Werror=unused-command-line-argument-hard-error-in-future: No option -Wunused-command-line-argument-hard-error-in-future
cc1: error: -Werror=unused-command-line-argument-hard-error-in-future: No option -Wunused-command-line-argument-hard-error-in-future
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't figure out the architecture type of: /var/folders/z_/p0qs_dyn5w186pp5wym5c65c0000gp/T//ccZjgonH.out
error: command 'gcc-4.2' failed with exit status 1
----------------------------------------
Command "/Users/yak007/workspace/hovercraft/env/vhov/bin/python3.5 -c "import setuptools, tokenize;__file__='/private/var/folders/z_/p0qs_dyn5w186pp5wym5c65c0000gp/T/pip-build-8i5b7kqd/watchdog/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/z_/p0qs_dyn5w186pp5wym5c65c0000gp/T/pip-jkl462at-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/yak007/workspace/hovercraft/env/vhov/include/site/python3.5/watchdog" failed with error code 1 in /private/var/folders/z_/p0qs_dyn5w186pp5wym5c65c0000gp/T/pip-build-8i5b7kqd/watchdog
Desde então, removi o pacote install Python 3.5b2 e brew install python3 --devel
(para preparar a instalação python3.5b2), criei um novo virtualenv com pyvenv-3.5
, confirmei a versão do python, etc.
Mesma falha - então isso não parece ser sobre a mistura de métodos de instalação do python.
Em vez disso, parece ser por causa de um antigo pacote brew info apple-gcc42
. Uma vez que eu brew unlink apple-gcc42
, a instalação funciona. Espero que isso ajude outra pessoa.
(vhov) Yarkos-MacBook-Pro:hovercraft yak007$ ls -l $(which gcc-4.2)
lrwxr-xr-x 1 yak007 staff 46 Jun 20 2013 /usr/local/bin/gcc-4.2 -> ../Cellar/apple-gcc42/4.2.1-5666.3/bin/gcc-4.2
Oi - estou tendo esse mesmo problema, instalando no Mac OSX 10.6 (consulte https://github.com/getnikola/nikola/issues/2148 para o problema original). Eu instalei o python 3.5 do python.org. O comando
brew unlink apple-gcc42
simplesmente dá
Erro: Não existe tal barril: /usr/local/Cellar/apple-gcc42
Alguma outra sugestão?
Obrigada!
Gerry.
Eu me deparei com esse problema ao tentar fazer um simples pip install watchdog
em um virtualenv com o Python 3.6.5 no meu mac.
Acontece que na linha 34 setup.py
, onde a plataforma é detectada como OSX, está adicionando este argumento de compilação -Wno-error=unused-command-line-argument-hard-error-in-future
que não é suportado pelo gcc enviado como padrão com instalações mais antigas do Xcode.
Como estou usando o homebrew gcc ( gcc version 8.1.0 (Homebrew GCC 8.1.0)
) em vez do Xcode, para corrigir isso, tive que pular essa verificação no L34 alterando a string macosx
para algo como macosy
e em seguida, execute python3 setup.py install
que resultou em uma instalação bem-sucedida.
Comentários muito úteis
Desde então, removi o pacote install Python 3.5b2 e
brew install python3 --devel
(para preparar a instalação python3.5b2), criei um novo virtualenv compyvenv-3.5
, confirmei a versão do python, etc.Mesma falha - então isso não parece ser sobre a mistura de métodos de instalação do python.
Em vez disso, parece ser por causa de um antigo pacote
brew info apple-gcc42
. Uma vez que eubrew unlink apple-gcc42
, a instalação funciona. Espero que isso ajude outra pessoa.