通过cmd启动Spyder时出现此错误 另外,我无法通过单击快捷方式来运行它
Traceback (most recent call last):
File "C:\Akash Shanmugaraj\anaconda3\Scripts\spyder-script.py", line 6, in <module>
from spyder.app.start import main
File "C:\Akash Shanmugaraj\anaconda3\lib\site-packages\spyder\app\start.py", line 22, in <module>
import zmq
File "C:\Users\Akash Shanmugaraj\AppData\Roaming\Python\Python38\site-packages\zmq\__init__.py", line 47, in <module>
from zmq import backend
File "C:\Users\Akash Shanmugaraj\AppData\Roaming\Python\Python38\site-packages\zmq\backend\__init__.py", line 40, in <module>
reraise(*exc_info)
File "C:\Users\Akash Shanmugaraj\AppData\Roaming\Python\Python38\site-packages\zmq\utils\sixcerpt.py", line 34, in reraise
raise value
File "C:\Users\Akash Shanmugaraj\AppData\Roaming\Python\Python38\site-packages\zmq\backend\__init__.py", line 27, in <module>
_ns = select_backend(first)
File "C:\Users\Akash Shanmugaraj\AppData\Roaming\Python\Python38\site-packages\zmq\backend\select.py", line 28, in select_backend
mod = __import__(name, fromlist=public_api)
File "C:\Users\Akash Shanmugaraj\AppData\Roaming\Python\Python38\site-packages\zmq\backend\cython\__init__.py", line 6, in <module>
from . import (constants, error, message, context,
ImportError: cannot import name 'constants' from partially initialized module 'zmq.backend.cython' (most likely due to a circular import) (C:\Users\Akash Shanmugaraj\AppData\Roaming\Python\Python38\site-packages\zmq\backend\cython\__init__.py)
答案 0 :(得分:1)
我有同样的问题。 “激活基地”没有帮助,但只是找到了解决方案。当然不是很正确,但是可以。
转到文件夹:
C:\ Users \ << em>您的登录> \ AppData \ Roaming \ Python
并在“ Python_x”或其他名称上将其重命名(“ Python”)。
Spyder和Navigator启动,到目前为止一切正常,但不要删除该文件夹。
答案 1 :(得分:0)
在cmd中,尝试通过运行来激活基本环境(或任何其他相关环境)
activate base
然后尝试运行spyder。