pip 安装jupyterlab报错“Could not build wheels for cffi”

报错代码如下:

(torch) panpan@bogon ~ % conda env list
# conda environments:
#
base                     /Users/panpan/anaconda3
torch                 *  /Users/panpan/anaconda3/envs/torch

(torch) panpan@bogon ~ % pip install jupyterlab
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting jupyterlab
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/a3/48/ccad3b49a741755367dd1e070799847f6493c64c3b3189a757ed0fc1ef27/jupyterlab-4.0.3-py3-none-any.whl (9.2 MB)
Collecting async-lru>=1.0.0 (from jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/65/7e/06ed5a62dd348c5d94b0bed1be495aec9772e418af296ce4c75266391297/async_lru-2.0.3-py3-none-any.whl (6.0 kB)
Collecting importlib-metadata>=4.8.3 (from jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/cc/37/db7ba97e676af155f5fcb1a35466f446eadc9104e25b83366e8088c9c926/importlib_metadata-6.8.0-py3-none-any.whl (22 kB)
Collecting importlib-resources>=1.4 (from jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/29/d1/bed03eca30aa05aaf6e0873de091f9385c48705c4a607c2dfe3edbe543e8/importlib_resources-6.0.0-py3-none-any.whl (31 kB)
Collecting ipykernel (from jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/00/75/5e27470b1f71ae1f83551f5bc0186c9579c5b5710fbfc4b001753b0f37fd/ipykernel-6.24.0-py3-none-any.whl (152 kB)
Collecting jinja2>=3.0.3 (from jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/bc/c3/f068337a370801f372f2f8f6bad74a5c140f6fda3d9de154052708dd3c65/Jinja2-3.1.2-py3-none-any.whl (133 kB)
Collecting jupyter-core (from jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/8c/e0/3f9061c5e99a03612510f892647b15a91f910c5275b7b77c6c72edae1494/jupyter_core-5.3.1-py3-none-any.whl (93 kB)
Collecting jupyter-lsp>=2.0.0 (from jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/8f/b6/a1571e48550855a79898f851f57e5858b00eb36b09ea3b1a8bb65c53a290/jupyter_lsp-2.2.0-py3-none-any.whl (65 kB)
Collecting jupyter-server<3,>=2.4.0 (from jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/f2/8f/914785ff2a0c4e2a7e15217710d57568f6ed6a84befa83a5a8c8b22ed3c6/jupyter_server-2.7.0-py3-none-any.whl (375 kB)
Collecting jupyterlab-server<3,>=2.19.0 (from jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/cb/14/8f1c4b9b80db855d48a762e248efd41649d102841b6bfadbd26b8c25e054/jupyterlab_server-2.23.0-py3-none-any.whl (57 kB)
Collecting notebook-shim>=0.2 (from jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/f4/79/73250372e5bbab63018b41b02d5cc6b395655ec6c1254e477ef7c913aada/notebook_shim-0.2.3-py3-none-any.whl (13 kB)
Collecting packaging (from jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/ab/c3/57f0601a2d4fe15de7a553c00adbc901425661bf048f2a22dfc500caf121/packaging-23.1-py3-none-any.whl (48 kB)
Collecting tomli (from jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/97/75/10a9ebee3fd790d20926a90a2547f0bf78f371b2f13aa822c759680ca7b9/tomli-2.0.1-py3-none-any.whl (12 kB)
Collecting tornado>=6.2.0 (from jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/30/3c/68e9896ce47dd4acdb7e27945046f139db2862d3b990c655a5c0627c9a05/tornado-6.3.2-cp38-abi3-macosx_10_9_universal2.whl (424 kB)
Collecting traitlets (from jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/77/75/c28e9ef7abec2b7e9ff35aea3e0be6c1aceaf7873c26c95ae1f0d594de71/traitlets-5.9.0-py3-none-any.whl (117 kB)
Collecting typing-extensions>=4.0.0 (from async-lru>=1.0.0->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/ec/6b/63cc3df74987c36fe26157ee12e09e8f9db4de771e0f3404263117e75b95/typing_extensions-4.7.1-py3-none-any.whl (33 kB)
Collecting zipp>=0.5 (from importlib-metadata>=4.8.3->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/8c/08/d3006317aefe25ea79d3b76c9650afabaf6d63d1c8443b236e7405447503/zipp-3.16.2-py3-none-any.whl (7.2 kB)
Collecting MarkupSafe>=2.0 (from jinja2>=3.0.3->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/03/06/e72e88f81f8c91d4f488d21712d2d403fd644e3172eaadc302094377bc22/MarkupSafe-2.1.3-cp38-cp38-macosx_10_9_universal2.whl (17 kB)
Collecting anyio>=3.1.0 (from jupyter-server<3,>=2.4.0->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/19/24/44299477fe7dcc9cb58d0a57d5a7588d6af2ff403fdd2d47a246c91a3246/anyio-3.7.1-py3-none-any.whl (80 kB)
Collecting argon2-cffi (from jupyter-server<3,>=2.4.0->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/a8/07/946d5a9431bae05a776a59746ec385fbb79b526738d25e4202d3e0bbf7f4/argon2_cffi-21.3.0-py3-none-any.whl (14 kB)
Collecting jupyter-client>=7.4.4 (from jupyter-server<3,>=2.4.0->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/29/24/0491f7837cedf39ae0f96d9b3e4db2fae31cc4dd5eac00a98ab0db996c9b/jupyter_client-8.3.0-py3-none-any.whl (103 kB)
Collecting jupyter-events>=0.6.0 (from jupyter-server<3,>=2.4.0->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/ee/14/e11a93c1b47a69432ee7898f1b55f1da27f2f93b009a34dbdafb9b903f81/jupyter_events-0.6.3-py3-none-any.whl (18 kB)
Collecting jupyter-server-terminals (from jupyter-server<3,>=2.4.0->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/ea/7f/36db12bdb90f5237766dcbf59892198daab7260acbcf03fc75e2a2a82672/jupyter_server_terminals-0.4.4-py3-none-any.whl (13 kB)
Collecting nbconvert>=6.4.4 (from jupyter-server<3,>=2.4.0->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/93/04/cc10ee418087f2a83f6862b9043291658ab81865f38cad41c74fba2306e5/nbconvert-7.7.2-py3-none-any.whl (254 kB)
Collecting nbformat>=5.3.0 (from jupyter-server<3,>=2.4.0->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/01/e5/322b31448ba6b0ed6de740306367e85d8da2af0d91e67f7a2860bdf87f72/nbformat-5.9.1-py3-none-any.whl (77 kB)
Collecting overrides (from jupyter-server<3,>=2.4.0->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/7f/36/3fef66c2bf1f66f35538a6703aca0447114b1873913c403f0ea589721aae/overrides-7.3.1-py3-none-any.whl (17 kB)
Collecting prometheus-client (from jupyter-server<3,>=2.4.0->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/ad/b3/6e18c89bf6bd120590ea538a62cae16dc763ff2745b18377c4be5495c4aa/prometheus_client-0.17.1-py3-none-any.whl (60 kB)
Collecting pyzmq>=24 (from jupyter-server<3,>=2.4.0->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/27/bb/a4d543592ed28075456033467d1649e4b81f7888d4d53b5dc2fbf47211b2/pyzmq-25.1.0-cp38-cp38-macosx_10_15_universal2.whl (1.8 MB)
Collecting send2trash (from jupyter-server<3,>=2.4.0->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/a9/78/e4df1e080ed790acf3a704edf521006dd96b9841bd2e2a462c0d255e0565/Send2Trash-1.8.2-py3-none-any.whl (18 kB)
Collecting terminado>=0.8.3 (from jupyter-server<3,>=2.4.0->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/84/a7/c7628d79651b8c8c775d27b374315a825141b5783512e82026fb210dd639/terminado-0.17.1-py3-none-any.whl (17 kB)
Collecting websocket-client (from jupyter-server<3,>=2.4.0->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/d3/a3/63e9329c8cc9be6153e919e17d0ef5b60d537fed78564872951b95bcc17c/websocket_client-1.6.1-py3-none-any.whl (56 kB)
Collecting platformdirs>=2.5 (from jupyter-core->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/6d/a7/47b7088a28c8fe5775eb15281bf44d39facdbe4bc011a95ccb89390c2db9/platformdirs-3.9.1-py3-none-any.whl (16 kB)
Collecting babel>=2.10 (from jupyterlab-server<3,>=2.19.0->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/df/c4/1088865e0246d7ecf56d819a233ab2b72f7d6ab043965ef327d0731b5434/Babel-2.12.1-py3-none-any.whl (10.1 MB)
Collecting json5>=0.9.0 (from jupyterlab-server<3,>=2.19.0->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/70/ba/fa37123a86ae8287d6678535a944f9c3377d8165e536310ed6f6cb0f0c0e/json5-0.9.14-py2.py3-none-any.whl (19 kB)
Collecting jsonschema>=4.17.3 (from jupyterlab-server<3,>=2.19.0->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/a1/ba/28ce987450c6afa8336373761193ddaadc1ba2004fbf23a6407db036f558/jsonschema-4.18.4-py3-none-any.whl (80 kB)
Collecting requests>=2.28 (from jupyterlab-server<3,>=2.19.0->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/70/8e/0e2d847013cb52cd35b38c009bb167a1a26b2ce6cd6965bf26b47bc0bf44/requests-2.31.0-py3-none-any.whl (62 kB)
Collecting appnope (from ipykernel->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/41/4a/381783f26df413dde4c70c734163d88ca0550a1361cb74a1c68f47550619/appnope-0.1.3-py2.py3-none-any.whl (4.4 kB)
Collecting comm>=0.1.1 (from ipykernel->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/74/f3/b88d7e1dadf741550c56b70d7ce62673354fddb68e143d193ceb80224208/comm-0.1.3-py3-none-any.whl (6.6 kB)
Collecting debugpy>=1.6.5 (from ipykernel->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/0f/63/d07f5c023abf3192200344d494118f7a00168d67eec50cc16c9bf20a3333/debugpy-1.6.7-py2.py3-none-any.whl (4.9 MB)
Collecting ipython>=7.23.1 (from ipykernel->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/18/39/d5911ef659dbae6398dfcb7ac9e266a8b886ed04f338ecf04b35f934ef87/ipython-8.12.2-py3-none-any.whl (797 kB)
Collecting matplotlib-inline>=0.1 (from ipykernel->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/f2/51/c34d7a1d528efaae3d8ddb18ef45a41f284eacf9e514523b191b7d0872cc/matplotlib_inline-0.1.6-py3-none-any.whl (9.4 kB)
Collecting nest-asyncio (from ipykernel->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/e9/1a/6dd9ec31cfdb34cef8fea0055b593ee779a6f63c8e8038ad90d71b7f53c0/nest_asyncio-1.5.6-py3-none-any.whl (5.2 kB)
Collecting psutil (from ipykernel->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/ed/98/2624954f83489ab13fde2b544baa337d5578c07eee304d320d9ba56e1b1f/psutil-5.9.5-cp38-abi3-macosx_11_0_arm64.whl (246 kB)
Collecting idna>=2.8 (from anyio>=3.1.0->jupyter-server<3,>=2.4.0->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/fc/34/3030de6f1370931b9dbb4dad48f6ab1015ab1d32447850b9fc94e60097be/idna-3.4-py3-none-any.whl (61 kB)
Collecting sniffio>=1.1 (from anyio>=3.1.0->jupyter-server<3,>=2.4.0->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/c3/a0/5dba8ed157b0136607c7f2151db695885606968d1fae123dc3391e0cfdbf/sniffio-1.3.0-py3-none-any.whl (10 kB)
Collecting exceptiongroup (from anyio>=3.1.0->jupyter-server<3,>=2.4.0->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/fe/17/f43b7c9ccf399d72038042ee72785c305f6c6fdc6231942f8ab99d995742/exceptiongroup-1.1.2-py3-none-any.whl (14 kB)
Collecting pytz>=2015.7 (from babel>=2.10->jupyterlab-server<3,>=2.19.0->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/7f/99/ad6bd37e748257dd70d6f85d916cafe79c0b0f5e2e95b11f7fbc82bf3110/pytz-2023.3-py2.py3-none-any.whl (502 kB)
Collecting backcall (from ipython>=7.23.1->ipykernel->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/4c/1c/ff6546b6c12603d8dd1070aa3c3d273ad4c07f5771689a7b69a550e8c951/backcall-0.2.0-py2.py3-none-any.whl (11 kB)
Collecting decorator (from ipython>=7.23.1->ipykernel->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/d5/50/83c593b07763e1161326b3b8c6686f0f4b0f24d5526546bee538c89837d6/decorator-5.1.1-py3-none-any.whl (9.1 kB)
Collecting jedi>=0.16 (from ipython>=7.23.1->ipykernel->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/6d/60/4acda63286ef6023515eb914543ba36496b8929cb7af49ecce63afde09c6/jedi-0.18.2-py2.py3-none-any.whl (1.6 MB)
Collecting pickleshare (from ipython>=7.23.1->ipykernel->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/9a/41/220f49aaea88bc6fa6cba8d05ecf24676326156c23b991e80b3f2fc24c77/pickleshare-0.7.5-py2.py3-none-any.whl (6.9 kB)
Collecting prompt-toolkit!=3.0.37,<3.1.0,>=3.0.30 (from ipython>=7.23.1->ipykernel->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/a9/b4/ba77c84edf499877317225d7b7bc047a81f7c2eed9628eeb6bab0ac2e6c9/prompt_toolkit-3.0.39-py3-none-any.whl (385 kB)
Collecting pygments>=2.4.0 (from ipython>=7.23.1->ipykernel->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/34/a7/37c8d68532ba71549db4212cb036dbd6161b40e463aba336770e80c72f84/Pygments-2.15.1-py3-none-any.whl (1.1 MB)
Collecting stack-data (from ipython>=7.23.1->ipykernel->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/6a/81/aa96c25c27f78cdc444fec27d80f4c05194c591465e491a1358d8a035bc1/stack_data-0.6.2-py3-none-any.whl (24 kB)
Collecting pexpect>4.3 (from ipython>=7.23.1->ipykernel->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/39/7b/88dbb785881c28a102619d46423cb853b46dbccc70d3ac362d99773a78ce/pexpect-4.8.0-py2.py3-none-any.whl (59 kB)
Collecting attrs>=22.2.0 (from jsonschema>=4.17.3->jupyterlab-server<3,>=2.19.0->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/f0/eb/fcb708c7bf5056045e9e98f62b93bd7467eb718b0202e7698eb11d66416c/attrs-23.1.0-py3-none-any.whl (61 kB)
Collecting jsonschema-specifications>=2023.03.6 (from jsonschema>=4.17.3->jupyterlab-server<3,>=2.19.0->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/1c/24/83349ac2189cc2435e84da3f69ba3c97314d3c0622628e55171c6798ed80/jsonschema_specifications-2023.7.1-py3-none-any.whl (17 kB)
Collecting pkgutil-resolve-name>=1.3.10 (from jsonschema>=4.17.3->jupyterlab-server<3,>=2.19.0->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/c9/5c/3d4882ba113fd55bdba9326c1e4c62a15e674a2501de4869e6bd6301f87e/pkgutil_resolve_name-1.3.10-py3-none-any.whl (4.7 kB)
Collecting referencing>=0.28.4 (from jsonschema>=4.17.3->jupyterlab-server<3,>=2.19.0->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/ea/c3/f75f0ce2cdacca3d68a70b1756635092a1add1002e34afb4895b9fb62598/referencing-0.30.0-py3-none-any.whl (25 kB)
Collecting rpds-py>=0.7.1 (from jsonschema>=4.17.3->jupyterlab-server<3,>=2.19.0->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/95/04/eba9a6b8211bff6449297db15ae9453139121cf44b7af88964b394553267/rpds_py-0.9.2-cp38-cp38-macosx_11_0_arm64.whl (306 kB)
Collecting python-dateutil>=2.8.2 (from jupyter-client>=7.4.4->jupyter-server<3,>=2.4.0->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/36/7a/87837f39d0296e723bb9b62bbb257d0355c7f6128853c78955f57342a56d/python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting python-json-logger>=2.0.4 (from jupyter-events>=0.6.0->jupyter-server<3,>=2.4.0->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/35/a6/145655273568ee78a581e734cf35beb9e33a370b29c5d3c8fee3744de29f/python_json_logger-2.0.7-py3-none-any.whl (8.1 kB)
Collecting pyyaml>=5.3 (from jupyter-events>=0.6.0->jupyter-server<3,>=2.4.0->jupyterlab)
  Using cached PyYAML-6.0.1-cp38-cp38-macosx_11_0_arm64.whl
Collecting rfc3339-validator (from jupyter-events>=0.6.0->jupyter-server<3,>=2.4.0->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/7b/44/4e421b96b67b2daff264473f7465db72fbdf36a07e05494f50300cc7b0c6/rfc3339_validator-0.1.4-py2.py3-none-any.whl (3.5 kB)
Collecting rfc3986-validator>=0.1.1 (from jupyter-events>=0.6.0->jupyter-server<3,>=2.4.0->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/9e/51/17023c0f8f1869d8806b979a2bffa3f861f26a3f1a66b094288323fba52f/rfc3986_validator-0.1.1-py2.py3-none-any.whl (4.2 kB)
Collecting beautifulsoup4 (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/57/f4/a69c20ee4f660081a7dedb1ac57f29be9378e04edfcb90c526b923d4bebc/beautifulsoup4-4.12.2-py3-none-any.whl (142 kB)
Collecting bleach!=5.0.0 (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/ac/e2/dfcab68c9b2e7800c8f06b85c76e5f978d05b195a958daa9b1dda54a1db6/bleach-6.0.0-py3-none-any.whl (162 kB)
Collecting defusedxml (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/07/6c/aa3f2f849e01cb6a001cd8554a88d4c77c5c1a31c95bdf1cf9301e6d9ef4/defusedxml-0.7.1-py2.py3-none-any.whl (25 kB)
Collecting jupyterlab-pygments (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/c0/7e/c3d1df3ae9b41686e664051daedbd70eea2e1d2bd9d9c33e7e1455bc9f96/jupyterlab_pygments-0.2.2-py2.py3-none-any.whl (21 kB)
Collecting mistune<4,>=2.0.3 (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/cc/c0/ac9587149e37cde62ae338e9db8241ae2fdc79a84bde8c8ba7caea2c22d8/mistune-3.0.1-py3-none-any.whl (47 kB)
Collecting nbclient>=0.5.0 (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/ac/5a/d670ca51e6c3d98574b9647599821590efcd811d71f58e9c89fc59a17685/nbclient-0.8.0-py3-none-any.whl (73 kB)
Collecting pandocfilters>=1.4.1 (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/5e/a8/878258cffd53202a6cc1903c226cf09e58ae3df6b09f8ddfa98033286637/pandocfilters-1.5.0-py2.py3-none-any.whl (8.7 kB)
Collecting tinycss2 (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/da/99/fd23634d6962c2791fb8cb6ccae1f05dcbfc39bce36bba8b1c9a8d92eae8/tinycss2-1.2.1-py3-none-any.whl (21 kB)
Collecting fastjsonschema (from nbformat>=5.3.0->jupyter-server<3,>=2.4.0->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/9d/93/a3ca3cdeb84065d7d8f8df4cb09ab44405f109183c1d2b915ec17574e6b1/fastjsonschema-2.18.0-py3-none-any.whl (23 kB)
Collecting charset-normalizer<4,>=2 (from requests>=2.28->jupyterlab-server<3,>=2.19.0->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/9c/71/bf12b8e0d6e1d84ed29c3e16ea1efc47ae96487bde823130d12139c434a0/charset_normalizer-3.2.0-cp38-cp38-macosx_11_0_arm64.whl (122 kB)
Collecting urllib3<3,>=1.21.1 (from requests>=2.28->jupyterlab-server<3,>=2.19.0->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/9b/81/62fd61001fa4b9d0df6e31d47ff49cfa9de4af03adecf339c7bc30656b37/urllib3-2.0.4-py3-none-any.whl (123 kB)
Collecting certifi>=2017.4.17 (from requests>=2.28->jupyterlab-server<3,>=2.19.0->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/4c/dd/2234eab22353ffc7d94e8d13177aaa050113286e93e7b40eae01fbf7c3d9/certifi-2023.7.22-py3-none-any.whl (158 kB)
Collecting ptyprocess (from terminado>=0.8.3->jupyter-server<3,>=2.4.0->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/22/a6/858897256d0deac81a172289110f31629fc4cee19b6f01283303e18c8db3/ptyprocess-0.7.0-py2.py3-none-any.whl (13 kB)
Collecting argon2-cffi-bindings (from argon2-cffi->jupyter-server<3,>=2.4.0->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/5a/e4/bf8034d25edaa495da3c8a3405627d2e35758e44ff6eaa7948092646fdcc/argon2_cffi_bindings-21.2.0-cp38-abi3-macosx_10_9_universal2.whl (53 kB)
Collecting six>=1.9.0 (from bleach!=5.0.0->nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/d9/5a/e7c31adbe875f2abbb91bd84cf2dc52d792b5a01506781dbcf25c91daf11/six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting webencodings (from bleach!=5.0.0->nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/f4/24/2a3e3df732393fed8b3ebf2ec078f05546de641fe1b667ee316ec1dcf3b7/webencodings-0.5.1-py2.py3-none-any.whl (11 kB)
Collecting parso<0.9.0,>=0.8.0 (from jedi>=0.16->ipython>=7.23.1->ipykernel->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/05/63/8011bd08a4111858f79d2b09aad86638490d62fbf881c44e434a6dfca87b/parso-0.8.3-py2.py3-none-any.whl (100 kB)
Collecting fqdn (from jsonschema>=4.17.3->jupyterlab-server<3,>=2.19.0->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/cf/58/8acf1b3e91c58313ce5cb67df61001fc9dcd21be4fadb76c1a2d540e09ed/fqdn-1.5.1-py3-none-any.whl (9.1 kB)
Collecting isoduration (from jsonschema>=4.17.3->jupyterlab-server<3,>=2.19.0->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/7b/55/e5326141505c5d5e34c5e0935d2908a74e4561eca44108fbfb9c13d2911a/isoduration-20.11.0-py3-none-any.whl (11 kB)
Collecting jsonpointer>1.13 (from jsonschema>=4.17.3->jupyterlab-server<3,>=2.19.0->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/12/f6/0232cc0c617e195f06f810534d00b74d2f348fe71b2118009ad8ad31f878/jsonpointer-2.4-py2.py3-none-any.whl (7.8 kB)
Collecting uri-template (from jsonschema>=4.17.3->jupyterlab-server<3,>=2.19.0->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/e7/00/3fca040d7cf8a32776d3d81a00c8ee7457e00f80c649f1e4a863c8321ae9/uri_template-1.3.0-py3-none-any.whl (11 kB)
Collecting webcolors>=1.11 (from jsonschema>=4.17.3->jupyterlab-server<3,>=2.19.0->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/d5/e1/3e9013159b4cbb71df9bd7611cbf90dc2c621c8aeeb677fc41dad72f2261/webcolors-1.13-py3-none-any.whl (14 kB)
Collecting wcwidth (from prompt-toolkit!=3.0.37,<3.1.0,>=3.0.30->ipython>=7.23.1->ipykernel->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/20/f4/c0584a25144ce20bfcf1aecd041768b8c762c1eb0aa77502a3f0baa83f11/wcwidth-0.2.6-py2.py3-none-any.whl (29 kB)
Collecting cffi>=1.0.1 (from argon2-cffi-bindings->argon2-cffi->jupyter-server<3,>=2.4.0->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/2b/a8/050ab4f0c3d4c1b8aaa805f70e26e84d0e27004907c5b8ecc1d31815f92a/cffi-1.15.1.tar.gz (508 kB)
  Preparing metadata (setup.py) ... done
Collecting soupsieve>1.2 (from beautifulsoup4->nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/49/37/673d6490efc51ec46d198c75903d99de59baffdd47aea3d071b80a9e4e89/soupsieve-2.4.1-py3-none-any.whl (36 kB)
Collecting executing>=1.2.0 (from stack-data->ipython>=7.23.1->ipykernel->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/28/3c/bc3819dd8b1a1588c9215a87271b6178cc5498acaa83885211f5d4d9e693/executing-1.2.0-py2.py3-none-any.whl (24 kB)
Collecting asttokens>=2.1.0 (from stack-data->ipython>=7.23.1->ipykernel->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/f3/e1/64679d9d0759db5b182222c81ff322c2fe2c31e156a59afd6e9208c960e5/asttokens-2.2.1-py2.py3-none-any.whl (26 kB)
Collecting pure-eval (from stack-data->ipython>=7.23.1->ipykernel->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/2b/27/77f9d5684e6bce929f5cfe18d6cfbe5133013c06cb2fbf5933670e60761d/pure_eval-0.2.2-py3-none-any.whl (11 kB)
Collecting pycparser (from cffi>=1.0.1->argon2-cffi-bindings->argon2-cffi->jupyter-server<3,>=2.4.0->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/62/d5/5f610ebe421e85889f2e55e33b7f9a6795bd982198517d912eb1c76e1a53/pycparser-2.21-py2.py3-none-any.whl (118 kB)
Collecting arrow>=0.15.0 (from isoduration->jsonschema>=4.17.3->jupyterlab-server<3,>=2.19.0->jupyterlab)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/67/67/4bca5a595e2f89bff271724ddb1098e6c9e16f7f3d018d120255e3c30313/arrow-1.2.3-py3-none-any.whl (66 kB)
Building wheels for collected packages: cffi
  Building wheel for cffi (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [62 lines of output]
      xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
      xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
      
          No working compiler found, or bogus compiler options passed to
          the compiler from Python's standard "distutils" module.  See
          the error messages above.  Likely, the problem is not related
          to CFFI but generic to the setup.py of any Python package that
          tries to compile C code.  (Hints: on OS/X 10.8, for errors about
          -mno-fused-madd see http://stackoverflow.com/questions/22313407/
          Otherwise, see https://wiki.python.org/moin/CompLangPython or
          the IRC channel #python on irc.libera.chat.)
      
          Trying to continue anyway.  If you are trying to install CFFI from
          a build done in a different context, you can ignore this warning.
      
      /Users/panpan/anaconda3/envs/torch/lib/python3.8/site-packages/setuptools/config/setupcfg.py:293: _DeprecatedConfig: Deprecated config in `setup.cfg`
      !!
      
              ********************************************************************************
              The license_file parameter is deprecated, use license_files instead.
      
              By 2023-Oct-30, you need to update your project and remove deprecated calls
              or your builds will no longer be supported.
      
              See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
              ********************************************************************************
      
      !!
        parsed = self.parsers.get(option_name, lambda x: x)(value)
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-11.1-arm64-cpython-38
      creating build/lib.macosx-11.1-arm64-cpython-38/cffi
      copying cffi/backend_ctypes.py -> build/lib.macosx-11.1-arm64-cpython-38/cffi
      copying cffi/error.py -> build/lib.macosx-11.1-arm64-cpython-38/cffi
      copying cffi/setuptools_ext.py -> build/lib.macosx-11.1-arm64-cpython-38/cffi
      copying cffi/__init__.py -> build/lib.macosx-11.1-arm64-cpython-38/cffi
      copying cffi/cffi_opcode.py -> build/lib.macosx-11.1-arm64-cpython-38/cffi
      copying cffi/vengine_gen.py -> build/lib.macosx-11.1-arm64-cpython-38/cffi
      copying cffi/pkgconfig.py -> build/lib.macosx-11.1-arm64-cpython-38/cffi
      copying cffi/model.py -> build/lib.macosx-11.1-arm64-cpython-38/cffi
      copying cffi/ffiplatform.py -> build/lib.macosx-11.1-arm64-cpython-38/cffi
      copying cffi/api.py -> build/lib.macosx-11.1-arm64-cpython-38/cffi
      copying cffi/vengine_cpy.py -> build/lib.macosx-11.1-arm64-cpython-38/cffi
      copying cffi/commontypes.py -> build/lib.macosx-11.1-arm64-cpython-38/cffi
      copying cffi/lock.py -> build/lib.macosx-11.1-arm64-cpython-38/cffi
      copying cffi/recompiler.py -> build/lib.macosx-11.1-arm64-cpython-38/cffi
      copying cffi/cparser.py -> build/lib.macosx-11.1-arm64-cpython-38/cffi
      copying cffi/verifier.py -> build/lib.macosx-11.1-arm64-cpython-38/cffi
      copying cffi/_cffi_include.h -> build/lib.macosx-11.1-arm64-cpython-38/cffi
      copying cffi/parse_c_type.h -> build/lib.macosx-11.1-arm64-cpython-38/cffi
      copying cffi/_embedding.h -> build/lib.macosx-11.1-arm64-cpython-38/cffi
      copying cffi/_cffi_errors.h -> build/lib.macosx-11.1-arm64-cpython-38/cffi
      running build_ext
      building '_cffi_backend' extension
      creating build/temp.macosx-11.1-arm64-cpython-38
      creating build/temp.macosx-11.1-arm64-cpython-38/c
      gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/panpan/anaconda3/envs/torch/include -arch arm64 -I/Users/panpan/anaconda3/envs/torch/include -arch arm64 -DFFI_BUILDING=1 -I/usr/include/ffi -I/usr/include/libffi -I/Users/panpan/anaconda3/envs/torch/include/python3.8 -c c/_cffi_backend.c -o build/temp.macosx-11.1-arm64-cpython-38/c/_cffi_backend.o -iwithsysroot/usr/include/ffi
      xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for cffi
  Running setup.py clean for cffi
Failed to build cffi
ERROR: Could not build wheels for cffi, which is required to install pyproject.toml-based projects
(torch) panpan@bogon ~ %

看起来是没装CommandLineTools(CLT),macos特供问题:rofl:
试试这个,然后重启终端,再pip install jupyterlab

xcode-select --install 

https://blog.csdn.net/ViatorSun/article/details/108674066

这是前辈 @honeymoose 之前提醒过我的一段debug经验,也分享给你