Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

fatal error C1083: Cannot open include file: 'sys/un.h': No such file or directory

Tags:

anaconda

I'm getting these errors while working with Spyder and Anaconda. My Python scripts only work with the Anaconda prompt and nothing else is working. This is the whole error:

_cffi_ext.c
anaconda3\lib\site-packages\zmq\backend\cffi\__pycache__\_cffi_ext.c(266): fatal error C1083: Cannot open include file: 'sys/un.h': No such file or directory

Traceback (most recent call last):
  File "C:\Users\harsh_c1pywie\anaconda3\Scripts\spyder-script.py", line 6, in <module>
    from spyder.app.start import main
  File "C:\Users\harsh_c1pywie\anaconda3\lib\site-packages\spyder\app\start.py", line 22, in <module>
    import zmq
  File "C:\Users\harsh_c1pywie\anaconda3\lib\site-packages\zmq\__init__.py", line 47, in <module>
    from zmq import backend
  File "C:\Users\harsh_c1pywie\anaconda3\lib\site-packages\zmq\backend\__init__.py", line 40, in <module>
    reraise(*exc_info)
  File "C:\Users\harsh_c1pywie\anaconda3\lib\site-packages\zmq\utils\sixcerpt.py", line 34, in reraise
    raise value
  File "C:\Users\harsh_c1pywie\anaconda3\lib\site-packages\zmq\backend\__init__.py", line 27, in <module>
    _ns = select_backend(first)
  File "C:\Users\harsh_c1pywie\anaconda3\lib\site-packages\zmq\backend\select.py", line 28, in select_backend
    mod = __import__(name, fromlist=public_api)
  File "C:\Users\harsh_c1pywie\anaconda3\lib\site-packages\zmq\backend\cython\__init__.py", line 6, in <module>
    from . import (constants, error, message, context,
ImportError: DLL load failed: The specified module could not be found.

I even uninstalled and installed zmq but the error persists.

like image 808
Harsha Narayan Avatar asked May 23 '20 15:05

Harsha Narayan


2 Answers

Try

pip uninstall pyzmq 
pip install pyzmq
like image 72
CanciuCostin Avatar answered Sep 30 '22 16:09

CanciuCostin


@CanciuCostin's answer is correct, but for doing something slightly different worked:

pip uninstall pyzmq 
pip install --user pyzmq

HTH.

like image 39
Deepak Saini Avatar answered Sep 30 '22 17:09

Deepak Saini