在MacOS的Anaconda上安装spaCy

如何解决在MacOS的Anaconda上安装spaCy

我的环境

python2.7在Anaconda版本2019.10上运行。 macOS Catalina 10.15.5。

问题

我似乎无法在python上安装spaCy软件包。我没有遵循spaCy(https://spacy.io/usage)的文档。我已经尝试过conda,pip和从源代码安装。

重现问题

conda install(花很长时间然后卡住)

(base) MacBook-Pro:~ max$ sudo conda install -c conda-forge spacy
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json,will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: \ (gets stuck here)

pip install

(base) MacBook-Pro:~ max$ pip install -U spacy

DEPRECATION: Python 2.7 will reach the end of its life on January 1st,2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip,can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting spacy
  Using cached https://files.pythonhosted.org/packages/18/db/499f374339b522b6618234b93f25d2990692795ccce3152519ccc508586c/spacy-2.3.2.tar.gz
  Installing build dependencies ... error
  ERROR: Command errored out with exit status 1:
   command: /Applications/anaconda2/bin/python /Applications/anaconda2/lib/python2.7/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/k2/yfz74q0j1zq0_bgpcfvfj7br0000gn/T/pip-build-env-Hm0sIw/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel 'cython>=0.25' 'cymem>=2.0.2,<2.1.0' 'preshed>=3.0.2,<3.1.0' 'murmurhash>=0.28.0,<1.1.0' thinc==7.4.1
       cwd: None
  Complete output (191 lines):
  DEPRECATION: Python 2.7 will reach the end of its life on January 1st,can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
  Collecting setuptools
    Using cached https://files.pythonhosted.org/packages/e1/b7/182161210a13158cd3ccc41ee19aadef54496b74f2817cc147006ec932b4/setuptools-44.1.1-py2.py3-none-any.whl
  Collecting wheel
    Using cached https://files.pythonhosted.org/packages/a7/00/3df031b3ecd5444d572141321537080b40c1c25e1caa3d86cdd12e5e919c/wheel-0.35.1-py2.py3-none-any.whl
  Collecting cython>=0.25
    Using cached https://files.pythonhosted.org/packages/69/a7/6f692f3535e736d13add7841b9ee2ec5997832b26b72decc928f62404986/Cython-0.29.21-cp27-cp27m-macosx_10_9_x86_64.whl
  Collecting cymem<2.1.0,>=2.0.2
    Using cached https://files.pythonhosted.org/packages/ce/8d/d095bbb109a004351c85c83bc853782fc27692693b305dd7b170c36a1262/cymem-2.0.3.tar.gz
  Collecting preshed<3.1.0,>=3.0.2
    Using cached https://files.pythonhosted.org/packages/b2/44/f244c9b1c8d5ca79e0afdd20e04a93b45160f1541f9904c44673bb8e48d1/preshed-3.0.2-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
  Collecting murmurhash<1.1.0,>=0.28.0
    Using cached https://files.pythonhosted.org/packages/1a/be/1a824e7faeb786af7e9931a29034f09d877e3340c536dc9bf10f65b4d422/murmurhash-1.0.2-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
  Collecting thinc==7.4.1
  Collecting pathlib==1.0.1; python_version < "3.4" (from thinc==7.4.1)
  Collecting catalogue<1.1.0,>=0.0.7 (from thinc==7.4.1)
    Using cached https://files.pythonhosted.org/packages/6c/f9/9a5658e2f56932e41eb264941f9a2cb7f3ce41a80cb36b2af6ab78e2f8af/catalogue-1.0.0-py2.py3-none-any.whl
  Collecting srsly<1.1.0,>=0.0.6 (from thinc==7.4.1)
    Using cached https://files.pythonhosted.org/packages/c4/28/ffb9f0b940041aeaec2194e840b5ffe19d0ae252de89579fa8b810174d9f/srsly-1.0.2.tar.gz
  Collecting tqdm<5.0.0,>=4.10.0 (from thinc==7.4.1)
    Using cached https://files.pythonhosted.org/packages/28/7e/281edb5bc3274dfb894d90f4dbacfceaca381c2435ec6187a2c6f329aed7/tqdm-4.48.2-py2.py3-none-any.whl
  Collecting plac<1.2.0,>=0.9.6 (from thinc==7.4.1)
    Using cached https://files.pythonhosted.org/packages/86/85/40b8f66c2dd8f4fd9f09d59b22720cffecf1331e788b8a0cab5bafb353d1/plac-1.1.3-py2.py3-none-any.whl
  Collecting blis<0.5.0,>=0.4.0 (from thinc==7.4.1)
    Using cached https://files.pythonhosted.org/packages/09/e0/7f618f18497135cc98f0a09ccaaad795efe044b7e2cfd3f4251acb2a9d0a/blis-0.4.1-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
  Collecting numpy>=1.7.0 (from thinc==7.4.1)
    Using cached https://files.pythonhosted.org/packages/09/96/84cf406fe7d589f3dba9fc0f737e65985a3526c6d8c783f02d4b5a10825d/numpy-1.16.6-cp27-cp27m-macosx_10_9_x86_64.whl
  Collecting wasabi<1.1.0,>=0.0.9 (from thinc==7.4.1)
  Collecting importlib-metadata>=0.20; python_version < "3.8" (from catalogue<1.1.0,>=0.0.7->thinc==7.4.1)
    Using cached https://files.pythonhosted.org/packages/8e/58/cdea07eb51fc2b906db0968a94700866fc46249bdc75cac23f9d13168929/importlib_metadata-1.7.0-py2.py3-none-any.whl
  Collecting zipp>=0.5 (from importlib-metadata>=0.20; python_version < "3.8"->catalogue<1.1.0,>=0.0.7->thinc==7.4.1)
    Using cached https://files.pythonhosted.org/packages/96/0a/67556e9b7782df7118c1f49bdc494da5e5e429c93aa77965f33e81287c8c/zipp-1.2.0-py2.py3-none-any.whl
  Collecting contextlib2; python_version < "3" (from importlib-metadata>=0.20; python_version < "3.8"->catalogue<1.1.0,>=0.0.7->thinc==7.4.1)
    Using cached https://files.pythonhosted.org/packages/85/60/370352f7ef6aa96c52fb001831622f50f923c1d575427d021b8ab3311236/contextlib2-0.6.0.post1-py2.py3-none-any.whl
  Collecting pathlib2; python_version < "3" (from importlib-metadata>=0.20; python_version < "3.8"->catalogue<1.1.0,>=0.0.7->thinc==7.4.1)
    Using cached https://files.pythonhosted.org/packages/e9/45/9c82d3666af4ef9f221cbb954e1d77ddbb513faf552aea6df5f37f1a4859/pathlib2-2.3.5-py2.py3-none-any.whl
  Collecting configparser>=3.5; python_version < "3" (from importlib-metadata>=0.20; python_version < "3.8"->catalogue<1.1.0,>=0.0.7->thinc==7.4.1)
    Using cached https://files.pythonhosted.org/packages/7a/2a/95ed0501cf5d8709490b1d3a3f9b5cf340da6c433f896bbe9ce08dbe6785/configparser-4.0.2-py2.py3-none-any.whl
  Collecting six (from pathlib2; python_version < "3"->importlib-metadata>=0.20; python_version < "3.8"->catalogue<1.1.0,>=0.0.7->thinc==7.4.1)
    Using cached https://files.pythonhosted.org/packages/ee/ff/48bde5c0f013094d729fe4b0316ba2a24774b3ff1c52d924a8a4cb04078a/six-1.15.0-py2.py3-none-any.whl
  Collecting scandir; python_version < "3.5" (from pathlib2; python_version < "3"->importlib-metadata>=0.20; python_version < "3.8"->catalogue<1.1.0,>=0.0.7->thinc==7.4.1)
  Building wheels for collected packages: cymem,srsly
    Building wheel for cymem (setup.py): started
    Building wheel for cymem (setup.py): finished with status 'error'
    ERROR: Command errored out with exit status 1:
     command: /Applications/anaconda2/bin/python -u -c 'import sys,setuptools,tokenize; sys.argv[0] = '"'"'/private/var/folders/k2/yfz74q0j1zq0_bgpcfvfj7br0000gn/T/pip-install-E3v5tl/cymem/setup.py'"'"'; __file__='"'"'/private/var/folders/k2/yfz74q0j1zq0_bgpcfvfj7br0000gn/T/pip-install-E3v5tl/cymem/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/k2/yfz74q0j1zq0_bgpcfvfj7br0000gn/T/pip-wheel-k463Ej --python-tag cp27
         cwd: /private/var/folders/k2/yfz74q0j1zq0_bgpcfvfj7br0000gn/T/pip-install-E3v5tl/cymem/
    Complete output (25 lines):
    running bdist_wheel
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.7-x86_64-2.7
    creating build/lib.macosx-10.7-x86_64-2.7/cymem
    copying cymem/__init__.py -> build/lib.macosx-10.7-x86_64-2.7/cymem
    copying cymem/about.py -> build/lib.macosx-10.7-x86_64-2.7/cymem
    package init file 'cymem/tests/__init__.py' not found (or not a regular file)
    creating build/lib.macosx-10.7-x86_64-2.7/cymem/tests
    copying cymem/tests/test_import.py -> build/lib.macosx-10.7-x86_64-2.7/cymem/tests
    copying cymem/cymem.pyx -> build/lib.macosx-10.7-x86_64-2.7/cymem
    copying cymem/__init__.pxd -> build/lib.macosx-10.7-x86_64-2.7/cymem
    copying cymem/cymem.pxd -> build/lib.macosx-10.7-x86_64-2.7/cymem
    running build_ext
    building 'cymem.cymem' extension
    creating build/temp.macosx-10.7-x86_64-2.7
    creating build/temp.macosx-10.7-x86_64-2.7/cymem
    gcc -fno-strict-aliasing -I/Applications/anaconda2/include -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Applications/anaconda2/include/python2.7 -I/Applications/anaconda2/include/python2.7 -c cymem/cymem.cpp -o build/temp.macosx-10.7-x86_64-2.7/cymem/cymem.o -O3 -Wno-strict-prototypes -Wno-unused-function
    clang: warning: include path for libstdc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
    g++ -bundle -undefined dynamic_lookup -L/Applications/anaconda2/lib -arch x86_64 -arch x86_64 build/temp.macosx-10.7-x86_64-2.7/cymem/cymem.o -L/Applications/anaconda2/lib -o build/lib.macosx-10.7-x86_64-2.7/cymem/cymem.so
    clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 [-Wdeprecated]
    ld: library not found for -lstdc++
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    error: command 'g++' failed with exit status 1
    ----------------------------------------
    ERROR: Failed building wheel for cymem
    Running setup.py clean for cymem
    Building wheel for srsly (setup.py): started
    Building wheel for srsly (setup.py): finished with status 'error'
    ERROR: Command errored out with exit status 1:
     command: /Applications/anaconda2/bin/python -u -c 'import sys,tokenize; sys.argv[0] = '"'"'/private/var/folders/k2/yfz74q0j1zq0_bgpcfvfj7br0000gn/T/pip-install-E3v5tl/srsly/setup.py'"'"'; __file__='"'"'/private/var/folders/k2/yfz74q0j1zq0_bgpcfvfj7br0000gn/T/pip-install-E3v5tl/srsly/setup.py'"'"';f=getattr(tokenize,'"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/k2/yfz74q0j1zq0_bgpcfvfj7br0000gn/T/pip-wheel-eooA7v --python-tag cp27
         cwd: /private/var/folders/k2/yfz74q0j1zq0_bgpcfvfj7br0000gn/T/pip-install-E3v5tl/srsly/
    Complete output (86 lines):
    running bdist_wheel
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.7-x86_64-2.7
    creating build/lib.macosx-10.7-x86_64-2.7/srsly
    copying srsly/util.py -> build/lib.macosx-10.7-x86_64-2.7/srsly
    copying srsly/_msgpack_api.py -> build/lib.macosx-10.7-x86_64-2.7/srsly
    copying srsly/__init__.py -> build/lib.macosx-10.7-x86_64-2.7/srsly
    copying srsly/about.py -> build/lib.macosx-10.7-x86_64-2.7/srsly
    copying srsly/_json_api.py -> build/lib.macosx-10.7-x86_64-2.7/srsly
    copying srsly/_pickle_api.py -> build/lib.macosx-10.7-x86_64-2.7/srsly
    creating build/lib.macosx-10.7-x86_64-2.7/srsly/ujson
    copying srsly/ujson/__init__.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/ujson
    creating build/lib.macosx-10.7-x86_64-2.7/srsly/msgpack
    copying srsly/msgpack/_version.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/msgpack
    copying srsly/msgpack/util.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/msgpack
    copying srsly/msgpack/_msgpack_numpy.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/msgpack
    copying srsly/msgpack/__init__.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/msgpack
    copying srsly/msgpack/exceptions.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/msgpack
    copying srsly/msgpack/_ext_type.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/msgpack
    creating build/lib.macosx-10.7-x86_64-2.7/srsly/cloudpickle
    copying srsly/cloudpickle/cloudpickle.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/cloudpickle
    copying srsly/cloudpickle/__init__.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/cloudpickle
    creating build/lib.macosx-10.7-x86_64-2.7/srsly/tests
    copying srsly/tests/test_msgpack_api.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/tests
    copying srsly/tests/test_json_api.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/tests
    copying srsly/tests/test_pickle_api.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/tests
    copying srsly/tests/__init__.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/tests
    creating build/lib.macosx-10.7-x86_64-2.7/srsly/tests/ujson
    copying srsly/tests/ujson/__init__.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/tests/ujson
    copying srsly/tests/ujson/test_ujson.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/tests/ujson
    creating build/lib.macosx-10.7-x86_64-2.7/srsly/tests/msgpack
    copying srsly/tests/msgpack/test_extension.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/tests/msgpack
    copying srsly/tests/msgpack/test_subtype.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/tests/msgpack
    copying srsly/tests/msgpack/test_buffer.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/tests/msgpack
    copying srsly/tests/msgpack/test_unpack.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/tests/msgpack
    copying srsly/tests/msgpack/test_pack.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/tests/msgpack
    copying srsly/tests/msgpack/__init__.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/tests/msgpack
    copying srsly/tests/msgpack/test_except.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/tests/msgpack
    copying srsly/tests/msgpack/test_case.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/tests/msgpack
    copying srsly/tests/msgpack/test_read_size.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/tests/msgpack
    copying srsly/tests/msgpack/test_memoryview.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/tests/msgpack
    copying srsly/tests/msgpack/test_seq.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/tests/msgpack
    copying srsly/tests/msgpack/test_limits.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/tests/msgpack
    copying srsly/tests/msgpack/test_newspec.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/tests/msgpack
    copying srsly/tests/msgpack/test_numpy.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/tests/msgpack
    copying srsly/tests/msgpack/test_format.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/tests/msgpack
    copying srsly/tests/msgpack/test_stricttype.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/tests/msgpack
    copying srsly/tests/msgpack/test_sequnpack.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/tests/msgpack
    creating build/lib.macosx-10.7-x86_64-2.7/srsly/tests/cloudpickle
    copying srsly/tests/cloudpickle/testutils.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/tests/cloudpickle
    copying srsly/tests/cloudpickle/__init__.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/tests/cloudpickle
    copying srsly/tests/cloudpickle/cloudpickle_file_test.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/tests/cloudpickle
    copying srsly/ujson/ujson.c -> build/lib.macosx-10.7-x86_64-2.7/srsly/ujson
    copying srsly/ujson/JSONtoObj.c -> build/lib.macosx-10.7-x86_64-2.7/srsly/ujson
    copying srsly/ujson/objToJSON.c -> build/lib.macosx-10.7-x86_64-2.7/srsly/ujson
    copying srsly/ujson/version.h -> build/lib.macosx-10.7-x86_64-2.7/srsly/ujson
    copying srsly/ujson/py_defines.h -> build/lib.macosx-10.7-x86_64-2.7/srsly/ujson
    copying srsly/msgpack/_unpacker.pyx -> build/lib.macosx-10.7-x86_64-2.7/srsly/msgpack
    copying srsly/msgpack/_packer.pyx -> build/lib.macosx-10.7-x86_64-2.7/srsly/msgpack
    copying srsly/msgpack/sysdep.h -> build/lib.macosx-10.7-x86_64-2.7/srsly/msgpack
    copying srsly/msgpack/pack.h -> build/lib.macosx-10.7-x86_64-2.7/srsly/msgpack
    copying srsly/msgpack/unpack_define.h -> build/lib.macosx-10.7-x86_64-2.7/srsly/msgpack
    copying srsly/msgpack/buff_converter.h -> build/lib.macosx-10.7-x86_64-2.7/srsly/msgpack
    copying srsly/msgpack/unpack.h -> build/lib.macosx-10.7-x86_64-2.7/srsly/msgpack
    copying srsly/msgpack/pack_template.h -> build/lib.macosx-10.7-x86_64-2.7/srsly/msgpack
    copying srsly/msgpack/unpack_template.h -> build/lib.macosx-10.7-x86_64-2.7/srsly/msgpack
    running build_ext
    building 'srsly.msgpack._unpacker' extension
    creating build/temp.macosx-10.7-x86_64-2.7
    creating build/temp.macosx-10.7-x86_64-2.7/srsly
    creating build/temp.macosx-10.7-x86_64-2.7/srsly/msgpack
    gcc -fno-strict-aliasing -I/Applications/anaconda2/include -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -D__LITTLE_ENDIAN__=1 -I/Applications/anaconda2/include/python2.7 -I. -I/private/var/folders/k2/yfz74q0j1zq0_bgpcfvfj7br0000gn/T/pip-install-E3v5tl/srsly/include -I/Applications/anaconda2/include/python2.7 -c srsly/msgpack/_unpacker.cpp -o build/temp.macosx-10.7-x86_64-2.7/srsly/msgpack/_unpacker.o -O2 -Wno-strict-prototypes -Wno-unused-function
    clang: warning: include path for libstdc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
    In file included from srsly/msgpack/_unpacker.cpp:615:
    srsly/msgpack/unpack.h:277:45: warning: conversion from string literal to 'char *' is deprecated [-Wc++11-compat-deprecated-writable-strings]
        py = PyObject_CallFunction(u->ext_hook,"(is#)",(int)typecode,pos,(Py_ssize_t)length-1);
                                                ^
    1 warning generated.
    g++ -bundle -undefined dynamic_lookup -L/Applications/anaconda2/lib -arch x86_64 -arch x86_64 build/temp.macosx-10.7-x86_64-2.7/srsly/msgpack/_unpacker.o -L/Applications/anaconda2/lib -o build/lib.macosx-10.7-x86_64-2.7/srsly/msgpack/_unpacker.so -Wl,-rpath,@loader_path/../../srsly/platform/darwin/lib -lstdc++ -lm
    clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 [-Wdeprecated]
    clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 [-Wdeprecated]
    ld: library not found for -lstdc++
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    error: command 'g++' failed with exit status 1
    ----------------------------------------
    ERROR: Failed building wheel for srsly
    Running setup.py clean for srsly
  Failed to build cymem srsly
  Installing collected packages: setuptools,wheel,cython,cymem,murmurhash,preshed,pathlib,contextlib2,zipp,six,scandir,pathlib2,configparser,importlib-metadata,catalogue,srsly,tqdm,plac,numpy,blis,wasabi,thinc
    Running setup.py install for cymem: started
      Running setup.py install for cymem: finished with status 'error'
      ERROR: Command errored out with exit status 1:
       command: /Applications/anaconda2/bin/python -u -c 'import sys,'"'"'exec'"'"'))' install --record /private/var/folders/k2/yfz74q0j1zq0_bgpcfvfj7br0000gn/T/pip-record-CJ7M9x/install-record.txt --single-version-externally-managed --prefix /private/var/folders/k2/yfz74q0j1zq0_bgpcfvfj7br0000gn/T/pip-build-env-Hm0sIw/overlay --compile
           cwd: /private/var/folders/k2/yfz74q0j1zq0_bgpcfvfj7br0000gn/T/pip-install-E3v5tl/cymem/
      Complete output (10 lines):
      running install
      running build
      running build_py
      package init file 'cymem/tests/__init__.py' not found (or not a regular file)
      running build_ext
      building 'cymem.cymem' extension
      gcc -fno-strict-aliasing -I/Applications/anaconda2/include -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Applications/anaconda2/include/python2.7 -I/Applications/anaconda2/include/python2.7 -c cymem/cymem.cpp -o build/temp.macosx-10.7-x86_64-2.7/cymem/cymem.o -O3 -Wno-strict-prototypes -Wno-unused-function
      clang: error: no such file or directory: 'cymem/cymem.cpp'
      clang: error: no input files
      error: command 'gcc' failed with exit status 1
      ----------------------------------------
  ERROR: Command errored out with exit status 1: /Applications/anaconda2/bin/python -u -c 'import sys,'"'"'exec'"'"'))' install --record /private/var/folders/k2/yfz74q0j1zq0_bgpcfvfj7br0000gn/T/pip-record-CJ7M9x/install-record.txt --single-version-externally-managed --prefix /private/var/folders/k2/yfz74q0j1zq0_bgpcfvfj7br0000gn/T/pip-build-env-Hm0sIw/overlay --compile Check the logs for full command output.
  ----------------------------------------
ERROR: Command errored out with exit status 1: /Applications/anaconda2/bin/python /Applications/anaconda2/lib/python2.7/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/k2/yfz74q0j1zq0_bgpcfvfj7br0000gn/T/pip-build-env-Hm0sIw/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel 'cython>=0.25' 'cymem>=2.0.2,<1.1.0' thinc==7.4.1 Check the logs for full command output.

from source

克隆工作正常

git clone https://github.com/explosion/spaCy
cd spaCy

以下pip install没有:

pip install -r requirements.txt
pip install -U spacy-lookups-data
python setup.py build_ext --inplace

错误:

(base) MacBook-Pro:~ max$ pip install -U spacy-lookups-data
DEPRECATION: Python 2.7 will reach the end of its life on January 1st,can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Requirement already up-to-date: spacy-lookups-data in /Applications/anaconda2/lib/python2.7/site-packages (0.3.2)
Requirement already satisfied,skipping upgrade: setuptools in /Applications/anaconda2/lib/python2.7/site-packages (from spacy-lookups-data) (41.4.0)
(base) MacBook-Pro:~ max$ python setup.py build_ext --inplace
python: can't open file 'setup.py': [Errno 2] No such file or directory

解决方法

尝试创建新的环境:

conda create -n my_env spacy python=2.7

将Python版本更改为所需的版本,并包括创建时所需的任何其他规范。如果一个人将关注点分开并根据每个任务或每个项目创建环境,那么Conda的工作往往会更加顺畅。

旁注:在 base env中使用pip通常是个坏主意。请参阅“ Using Pip in a Conda Environment”。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


依赖报错 idea导入项目后依赖报错,解决方案:https://blog.csdn.net/weixin_42420249/article/details/81191861 依赖版本报错:更换其他版本 无法下载依赖可参考:https://blog.csdn.net/weixin_42628809/a
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下 2021-12-03 13:33:33.927 ERROR 7228 [ main] o.s.b.d.LoggingFailureAnalysisReporter : *************************** APPL
错误1:gradle项目控制台输出为乱码 # 解决方案:https://blog.csdn.net/weixin_43501566/article/details/112482302 # 在gradle-wrapper.properties 添加以下内容 org.gradle.jvmargs=-Df
错误还原:在查询的过程中,传入的workType为0时,该条件不起作用 &lt;select id=&quot;xxx&quot;&gt; SELECT di.id, di.name, di.work_type, di.updated... &lt;where&gt; &lt;if test=&qu
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct redisServer’没有名为‘server_cpulist’的成员 redisSetCpuAffinity(server.server_cpulist); ^ server.c: 在函数‘hasActiveC
解决方案1 1、改项目中.idea/workspace.xml配置文件,增加dynamic.classpath参数 2、搜索PropertiesComponent,添加如下 &lt;property name=&quot;dynamic.classpath&quot; value=&quot;tru
删除根组件app.vue中的默认代码后报错:Module Error (from ./node_modules/eslint-loader/index.js): 解决方案:关闭ESlint代码检测,在项目根目录创建vue.config.js,在文件中添加 module.exports = { lin
查看spark默认的python版本 [root@master day27]# pyspark /home/software/spark-2.3.4-bin-hadoop2.7/conf/spark-env.sh: line 2: /usr/local/hadoop/bin/hadoop: No s
使用本地python环境可以成功执行 import pandas as pd import matplotlib.pyplot as plt # 设置字体 plt.rcParams[&#39;font.sans-serif&#39;] = [&#39;SimHei&#39;] # 能正确显示负号 p
错误1:Request method ‘DELETE‘ not supported 错误还原:controller层有一个接口,访问该接口时报错:Request method ‘DELETE‘ not supported 错误原因:没有接收到前端传入的参数,修改为如下 参考 错误2:cannot r
错误1:启动docker镜像时报错:Error response from daemon: driver failed programming external connectivity on endpoint quirky_allen 解决方法:重启docker -&gt; systemctl r
错误1:private field ‘xxx‘ is never assigned 按Altʾnter快捷键,选择第2项 参考:https://blog.csdn.net/shi_hong_fei_hei/article/details/88814070 错误2:启动时报错,不能找到主启动类 #
报错如下,通过源不能下载,最后警告pip需升级版本 Requirement already satisfied: pip in c:\users\ychen\appdata\local\programs\python\python310\lib\site-packages (22.0.4) Coll
错误1:maven打包报错 错误还原:使用maven打包项目时报错如下 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources)
错误1:服务调用时报错 服务消费者模块assess通过openFeign调用服务提供者模块hires 如下为服务提供者模块hires的控制层接口 @RestController @RequestMapping(&quot;/hires&quot;) public class FeignControl
错误1:运行项目后报如下错误 解决方案 报错2:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project sb 解决方案:在pom.
参考 错误原因 过滤器或拦截器在生效时,redisTemplate还没有注入 解决方案:在注入容器时就生效 @Component //项目运行时就注入Spring容器 public class RedisBean { @Resource private RedisTemplate&lt;String
使用vite构建项目报错 C:\Users\ychen\work&gt;npm init @vitejs/app @vitejs/create-app is deprecated, use npm init vite instead C:\Users\ychen\AppData\Local\npm-