2

当我运行 python 3 -m pip install -U discord.py 时,我收到错误(见下文),说无法建造轮子。我已经尝试过 pip install wheel 它返回 Requirement already compatible: wheel in /usr/local/lib/python3.7/site-packages (0.31.1) 我尝试过 pip install -U discord.py --no-cache- dir 并且它仍然返回错误我相信我正在使用 python 3.7.0。如果有帮助,我正在使用 Macbook?我对此有点陌生,所以任何帮助将不胜感激!

    Collecting discord.py
  Using cached discord.py-1.3.3-py3-none-any.whl (676 kB)
Collecting websockets!=7.0,!=8.0,!=8.0.1,<9.0,>=6.0
  Using cached websockets-8.1-cp37-cp37m-macosx_10_6_intel.whl (66 kB)
Collecting aiohttp<3.7.0,>=3.6.0
  Using cached aiohttp-3.6.2-py3-none-any.whl (441 kB)
Collecting multidict<5.0,>=4.5
  Using cached multidict-4.7.5.tar.gz (50 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Requirement already satisfied, skipping upgrade: async-timeout<4.0,>=3.0 in /usr/local/lib/python3.7/site-packages (from aiohttp<3.7.0,>=3.6.0->discord.py) (3.0.1)
Collecting attrs>=17.3.0
  Using cached attrs-19.3.0-py2.py3-none-any.whl (39 kB)
Collecting yarl<2.0,>=1.0
  Using cached yarl-1.4.2.tar.gz (163 kB)
Requirement already satisfied, skipping upgrade: chardet<4.0,>=2.0 in /usr/local/lib/python3.7/site-packages (from aiohttp<3.7.0,>=3.6.0->discord.py) (3.0.4)
Requirement already satisfied, skipping upgrade: idna>=2.0 in /usr/local/lib/python3.7/site-packages (from yarl<2.0,>=1.0->aiohttp<3.7.0,>=3.6.0->discord.py) (2.8)
Building wheels for collected packages: multidict, yarl
  Building wheel for multidict (PEP 517) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/local/opt/python/bin/python3.7 /usr/local/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /var/folders/gd/hk_mr3y15xqd49ty5xfkqjhw0000gp/T/tmpifkk05yv
       cwd: /private/var/folders/gd/hk_mr3y15xqd49ty5xfkqjhw0000gp/T/pip-install-xoap8323/multidict
  Complete output (44 lines):
  **********************
  * Accellerated build *
  **********************
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.11-x86_64-3.7
  creating build/lib.macosx-10.11-x86_64-3.7/multidict
  copying multidict/__init__.py -> build/lib.macosx-10.11-x86_64-3.7/multidict
  copying multidict/_abc.py -> build/lib.macosx-10.11-x86_64-3.7/multidict
  copying multidict/_compat.py -> build/lib.macosx-10.11-x86_64-3.7/multidict
  copying multidict/_multidict_base.py -> build/lib.macosx-10.11-x86_64-3.7/multidict
  copying multidict/_multidict_py.py -> build/lib.macosx-10.11-x86_64-3.7/multidict
  running egg_info
  writing multidict.egg-info/PKG-INFO
  writing dependency_links to multidict.egg-info/dependency_links.txt
  writing top-level names to multidict.egg-info/top_level.txt
  reading manifest file 'multidict.egg-info/SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  warning: no previously-included files matching '*.pyc' found anywhere in distribution
  warning: no previously-included files found matching 'multidict/_multidict.html'
  warning: no previously-included files found matching 'multidict/*.so'
  warning: no previously-included files found matching 'multidict/*.pyd'
  warning: no previously-included files found matching 'multidict/*.pyd'
  no previously-included directories found matching 'docs/_build'
  writing manifest file 'multidict.egg-info/SOURCES.txt'
  copying multidict/__init__.pyi -> build/lib.macosx-10.11-x86_64-3.7/multidict
  copying multidict/_multidict.c -> build/lib.macosx-10.11-x86_64-3.7/multidict
  copying multidict/py.typed -> build/lib.macosx-10.11-x86_64-3.7/multidict
  creating build/lib.macosx-10.11-x86_64-3.7/multidict/_multilib
  copying multidict/_multilib/defs.h -> build/lib.macosx-10.11-x86_64-3.7/multidict/_multilib
  copying multidict/_multilib/dict.h -> build/lib.macosx-10.11-x86_64-3.7/multidict/_multilib
  copying multidict/_multilib/istr.h -> build/lib.macosx-10.11-x86_64-3.7/multidict/_multilib
  copying multidict/_multilib/iter.h -> build/lib.macosx-10.11-x86_64-3.7/multidict/_multilib
  copying multidict/_multilib/pair_list.h -> build/lib.macosx-10.11-x86_64-3.7/multidict/_multilib
  copying multidict/_multilib/views.h -> build/lib.macosx-10.11-x86_64-3.7/multidict/_multilib
  running build_ext
  building 'multidict._multidict' extension
  creating build/temp.macosx-10.11-x86_64-3.7
  creating build/temp.macosx-10.11-x86_64-3.7/multidict
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c multidict/_multidict.c -o build/temp.macosx-10.11-x86_64-3.7/multidict/_multidict.o -O2 -std=c99 -Wall -Wsign-compare -Wconversion -fno-strict-aliasing -pedantic
  xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
  error: command 'clang' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for multidict
  Building wheel for yarl (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/local/opt/python/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/gd/hk_mr3y15xqd49ty5xfkqjhw0000gp/T/pip-install-xoap8323/yarl/setup.py'"'"'; __file__='"'"'/private/var/folders/gd/hk_mr3y15xqd49ty5xfkqjhw0000gp/T/pip-install-xoap8323/yarl/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/gd/hk_mr3y15xqd49ty5xfkqjhw0000gp/T/pip-wheel-xg5gzjf7
       cwd: /private/var/folders/gd/hk_mr3y15xqd49ty5xfkqjhw0000gp/T/pip-install-xoap8323/yarl/
  Complete output (37 lines):
  **********************
  * Accellerated build *
  **********************
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.11-x86_64-3.7
  creating build/lib.macosx-10.11-x86_64-3.7/yarl
  copying yarl/__init__.py -> build/lib.macosx-10.11-x86_64-3.7/yarl
  copying yarl/quoting.py -> build/lib.macosx-10.11-x86_64-3.7/yarl
  running egg_info
  writing yarl.egg-info/PKG-INFO
  writing dependency_links to yarl.egg-info/dependency_links.txt
  writing requirements to yarl.egg-info/requires.txt
  writing top-level names to yarl.egg-info/top_level.txt
  reading manifest file 'yarl.egg-info/SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  warning: no previously-included files matching '*.pyc' found anywhere in distribution
  warning: no previously-included files matching '*.cache' found anywhere in distribution
  warning: no previously-included files found matching 'yarl/_quoting.html'
  warning: no previously-included files found matching 'yarl/_quoting.*.so'
  warning: no previously-included files found matching 'yarl/_quoting.pyd'
  warning: no previously-included files found matching 'yarl/_quoting.*.pyd'
  no previously-included directories found matching 'docs/_build'
  writing manifest file 'yarl.egg-info/SOURCES.txt'
  copying yarl/__init__.pyi -> build/lib.macosx-10.11-x86_64-3.7/yarl
  copying yarl/_quoting.c -> build/lib.macosx-10.11-x86_64-3.7/yarl
  copying yarl/_quoting.pyx -> build/lib.macosx-10.11-x86_64-3.7/yarl
  copying yarl/py.typed -> build/lib.macosx-10.11-x86_64-3.7/yarl
  running build_ext
  building 'yarl._quoting' extension
  creating build/temp.macosx-10.11-x86_64-3.7
  creating build/temp.macosx-10.11-x86_64-3.7/yarl
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c yarl/_quoting.c -o build/temp.macosx-10.11-x86_64-3.7/yarl/_quoting.o
  xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
  error: command 'clang' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for yarl
  Running setup.py clean for yarl
Failed to build multidict yarl
ERROR: Could not build wheels for multidict which use PEP 517 and cannot be installed directly
4

0 回答 0