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 -r requirements.txt failed for Watchdog on macOS #22

Closed
lidianxiang opened this issue Jun 16, 2020 · 2 comments
Closed

pip install -r requirements.txt failed for Watchdog on macOS #22

lidianxiang opened this issue Jun 16, 2020 · 2 comments

Comments

@lidianxiang
Copy link

lidianxiang commented Jun 16, 2020

当我在执行pip install -r requirements.txt,报以下错误:

Requirement already satisfied: bootstrap-flask==1.2.0 in ./env/lib/python3.6/site-packages (from -r requirements.txt (line 1)) (1.2.0)
Requirement already satisfied: click==7.1.1 in ./env/lib/python3.6/site-packages (from -r requirements.txt (line 2)) (7.1.1)
Requirement already satisfied: flask-moment==0.9.0 in ./env/lib/python3.6/site-packages (from -r requirements.txt (line 3)) (0.9.0)
Requirement already satisfied: flask-sqlalchemy==2.4.1 in ./env/lib/python3.6/site-packages (from -r requirements.txt (line 4)) (2.4.1)
Requirement already satisfied: flask-wtf==0.14.3 in ./env/lib/python3.6/site-packages (from -r requirements.txt (line 5)) (0.14.3)
Requirement already satisfied: flask==1.1.2 in ./env/lib/python3.6/site-packages (from -r requirements.txt (line 6)) (1.1.2)
Requirement already satisfied: itsdangerous==1.1.0 in ./env/lib/python3.6/site-packages (from -r requirements.txt (line 7)) (1.1.0)
Requirement already satisfied: jinja2==2.11.1 in ./env/lib/python3.6/site-packages (from -r requirements.txt (line 8)) (2.11.1)
Requirement already satisfied: markupsafe==1.1.1 in ./env/lib/python3.6/site-packages (from -r requirements.txt (line 9)) (1.1.1)
Requirement already satisfied: python-dotenv==0.12.0 in ./env/lib/python3.6/site-packages (from -r requirements.txt (line 10)) (0.12.0)
Requirement already satisfied: sqlalchemy==1.3.15 in ./env/lib/python3.6/site-packages (from -r requirements.txt (line 11)) (1.3.15)
Requirement already satisfied: werkzeug==1.0.1 in ./env/lib/python3.6/site-packages (from -r requirements.txt (line 12)) (1.0.1)
Requirement already satisfied: wtforms==2.2.1 in ./env/lib/python3.6/site-packages (from -r requirements.txt (line 13)) (2.2.1)
Requirement already satisfied: faker==4.0.2 in ./env/lib/python3.6/site-packages (from -r requirements.txt (line 15)) (4.0.2)
Requirement already satisfied: pathtools==0.1.2 in ./env/lib/python3.6/site-packages (from -r requirements.txt (line 16)) (0.1.2)
Requirement already satisfied: python-dateutil==2.8.1 in ./env/lib/python3.6/site-packages (from -r requirements.txt (line 17)) (2.8.1)
Requirement already satisfied: six==1.14.0 in ./env/lib/python3.6/site-packages (from -r requirements.txt (line 18)) (1.14.0)
Requirement already satisfied: text-unidecode==1.3 in ./env/lib/python3.6/site-packages (from -r requirements.txt (line 19)) (1.3)
Collecting watchdog==0.10.2 (from -r requirements.txt (line 20))
  Downloading https://files.pythonhosted.org/packages/73/c3/ed6d992006837e011baca89476a4bbffb0a91602432f73bd4473816c76e2/watchdog-0.10.2.tar.gz (95kB)
    100% |████████████████████████████████| 102kB 7.7kB/s
Installing collected packages: watchdog
  Running setup.py install for watchdog ... error
    Complete output from command /Users/lidianxiang/Desktop/flask_project/sayhello/env/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/pw/f22wybpj5zd97xm6dpkl7_fh0000gn/T/pip-install-d6a7sr3v/watchdog/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/pw/f22wybpj5zd97xm6dpkl7_fh0000gn/T/pip-record-l65wyez7/install-record.txt --single-version-externally-managed --compile --install-headers /Users/lidianxiang/Desktop/flask_project/sayhello/env/include/site/python3.6/watchdog:
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.9-x86_64-3.6
    creating build/lib.macosx-10.9-x86_64-3.6/watchdog
    copying src/watchdog/watchmedo.py -> build/lib.macosx-10.9-x86_64-3.6/watchdog
    copying src/watchdog/version.py -> build/lib.macosx-10.9-x86_64-3.6/watchdog
    copying src/watchdog/events.py -> build/lib.macosx-10.9-x86_64-3.6/watchdog
    copying src/watchdog/__init__.py -> build/lib.macosx-10.9-x86_64-3.6/watchdog
    creating build/lib.macosx-10.9-x86_64-3.6/watchdog/utils
    copying src/watchdog/utils/unicode_paths.py -> build/lib.macosx-10.9-x86_64-3.6/watchdog/utils
    copying src/watchdog/utils/compat.py -> build/lib.macosx-10.9-x86_64-3.6/watchdog/utils
    copying src/watchdog/utils/win32stat.py -> build/lib.macosx-10.9-x86_64-3.6/watchdog/utils
    copying src/watchdog/utils/__init__.py -> build/lib.macosx-10.9-x86_64-3.6/watchdog/utils
    copying src/watchdog/utils/dirsnapshot.py -> build/lib.macosx-10.9-x86_64-3.6/watchdog/utils
    copying src/watchdog/utils/delayed_queue.py -> build/lib.macosx-10.9-x86_64-3.6/watchdog/utils
    copying src/watchdog/utils/platform.py -> build/lib.macosx-10.9-x86_64-3.6/watchdog/utils
    copying src/watchdog/utils/bricks.py -> build/lib.macosx-10.9-x86_64-3.6/watchdog/utils
    copying src/watchdog/utils/echo.py -> build/lib.macosx-10.9-x86_64-3.6/watchdog/utils
    creating build/lib.macosx-10.9-x86_64-3.6/watchdog/observers
    copying src/watchdog/observers/fsevents.py -> build/lib.macosx-10.9-x86_64-3.6/watchdog/observers
    copying src/watchdog/observers/inotify.py -> build/lib.macosx-10.9-x86_64-3.6/watchdog/observers
    copying src/watchdog/observers/__init__.py -> build/lib.macosx-10.9-x86_64-3.6/watchdog/observers
    copying src/watchdog/observers/api.py -> build/lib.macosx-10.9-x86_64-3.6/watchdog/observers
    copying src/watchdog/observers/inotify_buffer.py -> build/lib.macosx-10.9-x86_64-3.6/watchdog/observers
    copying src/watchdog/observers/winapi.py -> build/lib.macosx-10.9-x86_64-3.6/watchdog/observers
    copying src/watchdog/observers/read_directory_changes.py -> build/lib.macosx-10.9-x86_64-3.6/watchdog/observers
    copying src/watchdog/observers/kqueue.py -> build/lib.macosx-10.9-x86_64-3.6/watchdog/observers
    copying src/watchdog/observers/inotify_c.py -> build/lib.macosx-10.9-x86_64-3.6/watchdog/observers
    copying src/watchdog/observers/polling.py -> build/lib.macosx-10.9-x86_64-3.6/watchdog/observers
    copying src/watchdog/observers/fsevents2.py -> build/lib.macosx-10.9-x86_64-3.6/watchdog/observers
    creating build/lib.macosx-10.9-x86_64-3.6/watchdog/tricks
    copying src/watchdog/tricks/__init__.py -> build/lib.macosx-10.9-x86_64-3.6/watchdog/tricks
    running egg_info
    writing src/watchdog.egg-info/PKG-INFO
    writing dependency_links to src/watchdog.egg-info/dependency_links.txt
    writing entry points to src/watchdog.egg-info/entry_points.txt
    writing requirements to src/watchdog.egg-info/requires.txt
    writing top-level names to src/watchdog.egg-info/top_level.txt
    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.9-x86_64-3.6
    creating build/temp.macosx-10.9-x86_64-3.6/src
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/lidianxiang/anaconda3/envs/tensorflow2/include -arch x86_64 -I/Users/lidianxiang/anaconda3/envs/tensorflow2/include -arch x86_64 -I/opt/X11/include -DWATCHDOG_VERSION_STRING="0.10.2" -DWATCHDOG_VERSION_MAJOR=0 -DWATCHDOG_VERSION_MINOR=10 -DWATCHDOG_VERSION_BUILD=2 -I/Users/lidianxiang/Desktop/flask_project/sayhello/env/include -I/Users/lidianxiang/anaconda3/envs/tensorflow2/include/python3.6m -c src/watchdog_fsevents.c -o build/temp.macosx-10.9-x86_64-3.6/src/watchdog_fsevents.o -std=c99 -pedantic -Wall -Wextra -fPIC -Wno-nullability-completeness -Wno-nullability-extension -Wno-newline-eof -Wno-error=unused-command-line-argument
    cc1: error: -Werror=unused-command-line-argument: no option -Wunused-command-line-argument
    cc1: warning: unrecognized command line option '-Wno-newline-eof'
    cc1: warning: unrecognized command line option '-Wno-nullability-extension'
    cc1: warning: unrecognized command line option '-Wno-nullability-completeness'
    error: command 'gcc' failed with exit status 1
@greyli
Copy link
Owner

greyli commented Jun 16, 2020

可以试一下这条命令:

rm -rf /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk

Interesting, it seems there is something in the header detection that is detecting the wrong SDK. The latest xcode command line utils appears to be installing two SDKs: one for 10.14 and one for 10.15 (with a symlink MacOS.sdk pointing to 10.15. Removing the 10.14 SDK now resolves the issue and I can build watchdog using the specified branch.

具体见这个 issue

@greyli greyli changed the title pip install -r requirements.txt failed! pip install -r requirements.txt failed for Watchdog on macOS Jun 16, 2020
@greyli
Copy link
Owner

greyli commented Jun 18, 2020

先关闭了,没解决可以继续评论或重开。

@greyli greyli closed this as completed Jun 18, 2020
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

2 participants