Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip install fails w/ 3.5b2, os/x #323

Closed
yarko opened this issue Jun 14, 2015 · 3 comments
Closed

pip install fails w/ 3.5b2, os/x #323

yarko opened this issue Jun 14, 2015 · 3 comments

Comments

@yarko
Copy link

yarko commented Jun 14, 2015

Putting this here for further checking.

I have brew installed pythons (2.7.10 and 3.4.3), so for now, my 3.5b2 is installed from the mac package (this might cause issues with headers, I'd guess). osx 10.10.3; latest Xcode;

In any case, here's the setup, and results (so far):

  • pyvenv a virtualenv
  • python 3.5b2
  • pip update all
  • pip install Cython

and then, attempt:

  • pip install watchdog

results in error for non-existing compilation flag (issues just a warning when installed on 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)

and the key action:

(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
@yarko
Copy link
Author

yarko commented Jun 14, 2015

I've since removed the package install Python 3.5b2, and brew install python3 --devel (to brew install python3.5b2), created a fresh virtualenv with pyvenv-3.5, confirmed the python version, etc.

Same failure - so this does not appear to be about the mixture of python installation methods.

Instead, it appears to be because of an old brew info apple-gcc42 package. Once I brew unlink apple-gcc42, installation works. Hopefully, this will help someone else.

(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

@yarko yarko closed this as completed Jun 14, 2015
@Nikolaissue
Copy link

Hi - I'm getting this same problem, installing on Mac OSX 10.6 (see getnikola/nikola#2148 for the original issue). I installed python 3.5 from python.org. The command
brew unlink apple-gcc42
simply gives
Error: No such keg: /usr/local/Cellar/apple-gcc42

Any other suggestions?
Thank you!
Gerry.

@nardeas
Copy link

nardeas commented Jul 6, 2018

I ran into this issue while trying to do a simple pip install watchdog in a virtualenv with Python 3.6.5 on my mac.

Turns out in setup.py line 34 where the platform is detected as OSX it's adding this compile arg -Wno-error=unused-command-line-argument-hard-error-in-future which is not supported by the gcc shipped as default with older Xcode installs.

Since I am using homebrew gcc (gcc version 8.1.0 (Homebrew GCC 8.1.0)) instead of Xcode, to fix this I had to skip that check on L34 by changing the string macosx to something else like macosy and then run python3 setup.py install which resulted in successful installation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants