macos python 安装numpy报错

具体报错:

ERROR: Command errored out with exit status 1:

   command: /Library/Developer/CommandLineTools/usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-install-y76_819o/numpy/setup.py'"'"'; __file__='"'"'/private/tmp/pip-install-y76_819o/numpy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' clean --all

       cwd: /private/tmp/pip-install-y76_819o/numpy

  Complete output (10 lines):

  Running from numpy source directory.

  

  `setup.py clean` is not supported, use one of the following instead:

  

    - `git clean -xdf` (cleans all files)

    - `git clean -Xdf` (cleans all versioned files, doesn't touch

                        files that aren't checked into the git repo)

  

  Add `--force` to your command to use it anyway if you must (unsupported).

  

  ----------------------------------------

  ERROR: Failed cleaning build dir for numpy

Failed to build numpy

ERROR: Could not build wheels for numpy which use PEP 517 and cannot be installed directly

WARNING: You are using pip version 19.2.3, however version 21.0 is available.

You should consider upgrading via the 'pip install --upgrade pip' command.