问题1、 ipykernel_launcher.py: error: unrecognized arguments:
usage: ipykernel_launcher.py [-h] [--id ID] [--test TEST] [--env ENV] ipykernel_launcher.py: error: unrecognized arguments: --ip=127.0.0.1 --stdin=9003 --control=9001 --hb=9000 --Session.signature_scheme="hmac-sha256" --Session.key=b"f2b8e6d9-9009-4512-8cde-7c264b5b6917" --shell=9002 --transport="tcp" --iopub=9004 --f=/Users/xxxx/Library/Jupyter/runtime/kernel-v2-58173eI4RoMgG0eN6.json
An exception has occurred, use %tb to see the full traceback.
解决:把python脚本里的args = parser.parse_args()改为args, _ = parser.parse_known_args()
两者区别参考博客:parse_args()和parse_known_args()的用法和区别-CSDN博客
问题2、ValueError: Unrecognised argument(s): encode
解决:把下面encode改为encoding
应该是3.9版本python用的是encoding
问题3、NotOpenSSLWarning: urllib3 v2.0 only supports OpenSSL 1.1.1+
/Users/xxxxx/Library/Python/3.9/lib/python/site-packages/urllib3/__init__.py:34: NotOpenSSLWarning: urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: urllib3>=2.0 does not work with system Python on macOS · Issue #3020 · urllib3/urllib3 · GitHub
解决:
pip3 uninstall urllib3 卸载高版本
pip3 install urllib3==1.23 -i https://pypi.tuna.tsinghua.edu.cn/simple 安装低版本