我对此很陌生,在我有停机时间的同时尝试学习一些编码,所以请多多包涵。我已经尝试了所有方法来解决此错误,因为它没有运行任何代码。
我尝试过:
1.卸载并重新安装Anaconda,Spyder
2.阅读其他与此相关的文章,并尝试以下命令:
conda更新设置工具
恢复出厂设置
Traceback (most recent call last):
File "/opt/anaconda3/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/opt/anaconda3/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/opt/anaconda3/lib/python3.7/site‑packages/spyder_kernels/console/__main__.py", line 11, in
start.main()
File "/opt/anaconda3/lib/python3.7/site‑packages/spyder_kernels/console/start.py", line 287, in main
import_spydercustomize()
File "/opt/anaconda3/lib/python3.7/site‑packages/spyder_kernels/console/start.py", line 39, in import_spydercustomize
import spydercustomize
File "/opt/anaconda3/lib/python3.7/site‑packages/spyder_kernels/customize/spydercustomize.py", line 17, in
import pdb
File "/opt/anaconda3/lib/python3.7/pdb.py", line 76, in
import code
File "/Users/***/code.py", line 18
conda update setuptools
^
SyntaxError: invalid syntax
其他信息:
-Spyder:4.0.1
-Python:3.7.6
-Mac:10.12.6
谢谢