自从升级到macOS X Mojave以来,我花了一些时间来修复损坏的virtualenvs。
到目前为止,我还无法使Jupyter Lab重新工作(它不在virtualenv中,但只有virtualenvs并不是唯一被破坏的东西)。我曾尝试卸载并重新安装,删除配置文件,但是每次尝试运行它时,我都会在日志中看到很多这样的信息:
Failed validating 'anyOf' in metaschema['properties']['dependencies']['additionalProperties']:
{'anyOf': [{'$ref': '#'}, {'$ref': '#/definitions/stringArray'}]}
On schema['dependencies']['@phosphor/coreutils']:
'^1.3.0'
[W 21:21:16.507 LabApp] Failed validating schema (@jupyterlab/apputils-extension:package): '^1.3.0' is not valid under any of the given schemas
Failed validating 'anyOf' in metaschema['properties']['dependencies']['additionalProperties']:
{'anyOf': [{'$ref': '#'}, {'$ref': '#/definitions/stringArray'}]}
On schema['dependencies']['@phosphor/coreutils']:
'^1.3.0'
[E 21:21:16.508 LabApp] {
"Host": "localhost:8888",
"Pragma": "no-cache",
"Accept": "*/*",
"Authorization": "token 1c25604e6d9a5d08440c050bfe99371ca8ae49d9013b1e60",
"X-Xsrftoken": "2|67a5ba88|326aa1a39e6b836f582277ddbe216e5d|1564426315",
"Accept-Language": "en-gb",
"Accept-Encoding": "gzip, deflate",
"Cache-Control": "no-cache",
"Content-Type": "application/json",
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1.1 Safari/605.1.15",
"Referer": "http://localhost:8888/lab",
"Connection": "keep-alive",
"Cookie": "username-localhost-8888=\"2|1:0|10:1564428075|23:username-localhost-8888|44:NGE5NGUzNjQ3Nzk1NDg3ZDhhZDJjMzMzNGQ4YjIxZTY=|fbad0ac1870311e81a757f7b7f29e518a590866fdff43c8052c0b5948827afdf\"; _xsrf=2|67a5ba88|326aa1a39e6b836f582277ddbe216e5d|1564426315; csrftoken=8Xen0lrpX85mpWqJlTM56tJOBMxzV5bDiYob1RkrjEiqinkGM6ZzPD1JEHDestg5; sessionid=2hqsblwh6s39vdu277opsks0q7o8jkbj; intercom-id-wcfe7111=1ade79ee-89ec-4a57-9726-3bdb8c8e74e4; _ga=GA1.1.1964886736.1538676593; ajs_anonymous_id=%22a58f1e16-4032-42e2-ac80-137208581469%22; ajs_group_id=null; ajs_user_id=null; _mkto_trk=id:318-MHM-176&token:_mch-localhost-1563463668144-88346; visitor_id436452=381310855; visitor_id436452-hash=027543ef80a6862004d3552b234f57b8de495b0ad7e457378187ac92195c938460b84d25649ed617d8a84c7115f6e13098c9becd; gwcc=%7B%22fallback%22%3A%223012155500%22%2C%22clabel%22%3A%22_lc7CMmGwnUQioKMlAM%22%2C%22backoff%22%3A86400%2C%22backoff_expires%22%3A1556887837%7D; django_language=en; intercom-id-wcfe7111=1ade79ee-89ec-4a57-9726-3bdb8c8e74e4; _ga=GA1.1.1964886736.1538676593; __utma=111872281.1964886736.1538676593.1540484638.1549367535.8; __utmz=111872281.1540300566.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __atuvc=1%7C3%2C0%7C4%2C0%7C5%2C1%7C6; __insp_slim=1546950791666; __insp_norec_sess=true; __insp_nv=true; __insp_targlpt=SmVydXNhbGVtIFVuaXZlcnNpdHkgQ29sbGVnZSAtIFN0dWR5IGluIEplcnVzYWxlbSEgLSBKVUM%3D; __insp_targlpu=aHR0cDovL2xvY2FsaG9zdDo4MDAwLw%3D%3D; __insp_wid=638986093; muxData=mux_viewer_id=8a41100f-8b86-4dc0-810a-bbc1a74b500d&msn=0.24001098666179133&sid=a339ac60-5b34-43c0-b576-e39c36d17bfc&sst=1527685911825&sex=1527687794581"
}
[E 21:21:16.511 LabApp] 500 GET /lab/api/settings/?1564428076484 (::1) 9.81ms referer=http://localhost:8888/lab
[I 21:21:16.689 LabApp] 301 GET /lab/workspaces/auto-Z/?clone (::1) 0.98ms
我很确定这实际上是一些前端问题,而不是Jupyter本身。浏览器中唯一出现的是菜单有些破损,但是我可以在其中打开 Launch Classic Notebook ,确实旧的Jupyter笔记本似乎可以正常工作。
这里发生了什么问题,我该如何解决?
答案 0 :(得分:1)
似乎某些前端组件确实不起作用。
jupyter lab clean && jupyter lab build
失败,并发现一个错误:
The engine "node" is incompatible with this module. Expected version "6.* || 8.* || >= 10.*". Got "9.8.0"
我通过以下方式将Node升级到了最新的12.6.0版本:
brew upgrade node
之后,我能够成功运行jupyter lab build
,现在它可以按预期运行。