What steps will reproduce the problem?
What is the expected output? What do you see instead?
Please provide any additional information below
File "C:UsersSubashAnaconda3libsite-packagesspyderplugins__init__.py", line 511, in
toggled=lambda checked: self.toggle_view(checked),
File "C:UsersSubashAnaconda3libsite-packagesspyderpluginsipythonconsole.py", line 725, in toggle_view
self.create_new_client(give_focus=False)
File "C:UsersSubashAnaconda3libsite-packagesspyderpluginsipythonconsole.py", line 1014, in create_new_client
interpreter=pyexec)
File "C:UsersSubashAnaconda3libsite-packagesspyderutilsprograms.py", line 425, in is_module_installed
return eval(output.decode())
File "
Anaconda3envsstockmarketenvlibsite-packageszmqbackendcffi__pycache___cffi_ext.c(213): fatal error C1083: Cannot open include file: 'sys/un.h': No such file or directory
^
SyntaxError: invalid syntax
pyflakes >=0.6.0 : 1.6.0 (OK)
pycodestyle >=2.3: 2.3.1 (OK)
pygments >=2.0 : 2.2.0 (OK)
pandas >=0.13.1 : 0.22.0 (OK)
numpy >=1.7 : 1.14.0 (OK)
sphinx >=0.6.6 : 1.6.6 (OK)
rope >=0.9.4 : 0.10.7 (OK)
jedi >=0.9.0 : 0.11.1 (OK)
nbconvert >=4.0 : 5.3.1 (OK)
sympy >=0.7.3 : 1.1.1 (OK)
cython >=0.21 : 0.27.3 (OK)
qtconsole >=4.2.0: 4.3.1 (OK)
IPython >=4.0 : 6.2.1 (OK)
pylint >=0.25 : 1.8.2 (OK)
This is (most probably) caused because at some point you installed some packages with pip instead of using conda, as you always should with Anaconda (unless the package is only available through pip).
One possible solution is to close Spyder, open an Anaconda Prompt, run there
conda install -f zeromq pyzmq
and open Spyder again.
If that doesn't solve your problem, I'm afraid you'll have to reinstall Anaconda.
Would like to stop by and say - I faced a very similar issue. Was getting the error:
C:\Users\owenk\AppData\Roaming\Python\Python37\site-packages\zmq\backend\cffi\__pycache__\_cffi_ext.c(213): fatal error C1083: Cannot open include file: 'sys/un.h': No such file or directory
And then a traceback very similar to what OP had.
For me, conda install -f zeromq pyzmq
did not solve the issue. After trying a few other things, I was able to fix my issue by manually deleting the zmq
folder mentioned in the error message and _then_ running conda install -f zeromq pyzmq
.
And that's because you installed pyzmq with pip at some point, and that packages was generating a conflict with Anaconda.
I'm having the same issue - have not used pip once. Just un/reinstalled every microsoft VS/C++ or python related program. Then installed anaconda. Spyder does not open and I get this error. Delete zmq the conda install -f zeroq pyzmq works