Watchdog: la instalación de pip falla con 3.5b2, os/x

Creado en 14 jun. 2015  ·  3Comentarios  ·  Fuente: gorakhargosh/watchdog

Poniendo esto aquí para una mayor verificación.

He instalado pythons (2.7.10 y 3.4.3), así que por ahora, mi 3.5b2 está instalado desde el paquete mac (supongo que esto podría causar problemas con los encabezados). osx 10.10.3; último Xcode;

En cualquier caso, aquí está la configuración y los resultados (hasta ahora):

  • pyvenv a virtualenv
  • pitón 3.5b2
  • pip actualizar todo
  • pip instalar Cython

y luego, intenta:

  • perro guardián de instalación de pip

da como resultado un error para el indicador de compilación no existente (emite solo una advertencia cuando se instala en 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)

y la acción clave:

(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

Comentario más útil

Desde entonces, eliminé el paquete de instalación de Python 3.5b2 y brew install python3 --devel (para preparar la instalación de python3.5b2), creé un entorno virtual nuevo con pyvenv-3.5 , confirmé la versión de Python, etc.

Mismo error, por lo que no parece tratarse de la combinación de métodos de instalación de python.

En cambio, parece deberse a un paquete antiguo brew info apple-gcc42 . Una vez que brew unlink apple-gcc42 , la instalación funciona. Con suerte, esto ayudará a alguien más.

(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

Todos 3 comentarios

Desde entonces, eliminé el paquete de instalación de Python 3.5b2 y brew install python3 --devel (para preparar la instalación de python3.5b2), creé un entorno virtual nuevo con pyvenv-3.5 , confirmé la versión de Python, etc.

Mismo error, por lo que no parece tratarse de la combinación de métodos de instalación de python.

En cambio, parece deberse a un paquete antiguo brew info apple-gcc42 . Una vez que brew unlink apple-gcc42 , la instalación funciona. Con suerte, esto ayudará a alguien más.

(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

Hola, tengo el mismo problema al instalar en Mac OSX 10.6 (consulte https://github.com/getnikola/nikola/issues/2148 para ver el problema original). Instalé python 3.5 desde python.org. El comando
preparar desvincular apple-gcc42
simplemente da
Error: No existe tal barril: /usr/local/Cellar/apple-gcc42

¿Cualquier otra sugerencia?
¡Gracias!
Gerry.

Me encontré con este problema al intentar hacer un simple pip install watchdog en un virtualenv con Python 3.6.5 en mi mac.

Resulta que en la línea 34 de setup.py , donde la plataforma se detecta como OSX, está agregando este argumento de compilación -Wno-error=unused-command-line-argument-hard-error-in-future que no es compatible con el gcc enviado de forma predeterminada con las instalaciones anteriores de Xcode.

Como estoy usando homebrew gcc ( gcc version 8.1.0 (Homebrew GCC 8.1.0) ) en lugar de Xcode, para arreglar esto tuve que omitir esa verificación en L34 cambiando la cadena macosx a algo más como macosy y luego ejecute python3 setup.py install lo que resultó en una instalación exitosa.

¿Fue útil esta página
0 / 5 - 0 calificaciones

Temas relacionados

datakurre picture datakurre  ·  7Comentarios

Naatan picture Naatan  ·  3Comentarios

AndreaCrotti picture AndreaCrotti  ·  3Comentarios

xsank picture xsank  ·  5Comentarios

Ajordat picture Ajordat  ·  4Comentarios