Getting below error when trying to launch jupyter notebook. Any help to address this error is appreciated.
_cffi_ext.c C:\Users\emathew004\anaconda3\lib\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 Traceback (most recent call last): File
"C:\Users\emathew004\anaconda3\Scripts\jupyter-notebook-script.py",
line 6, in
from notebook.notebookapp import main File "C:\Users\emathew004\anaconda3\lib\site-packages\notebook\notebookapp.py",
line 47, in
from zmq.eventloop import ioloop File "C:\Users\emathew004\anaconda3\lib\site-packages\zmq__init__.py",
line 47, in
from zmq import backend File "C:\Users\emathew004\anaconda3\lib\site-packages\zmq\backend__init__.py",
line 40, in
reraise(*exc_info) File "C:\Users\emathew004\anaconda3\lib\site-packages\zmq\utils\sixcerpt.py",
line 34, in reraise
raise value File "C:\Users\emathew004\anaconda3\lib\site-packages\zmq\backend__init__.py",
line 27, in
_ns = select_backend(first) File "C:\Users\emathew004\anaconda3\lib\site-packages\zmq\backend\select.py",
line 28, in select_backend
mod = import(name, fromlist=public_api) File "C:\Users\emathew004\anaconda3\lib\site-packages\zmq\backend\cython__init__.py",
line 6, in
from . import (constants, error, message, context, ImportError: DLL load failed: The specified module could not be found
I've also had this problem, which I solved as follows.
conda uninstall pyzmq (uninstall pyzmq)
conda install pyzmq (reinstall pyzmq)
conda install jupyter (reinstall jupyter)
You need a corresponding version of visual c++ redistribution.
Related
I installed Anaconda today, but have been facing issues to launch Jupyter notebook. I tried out solutions online, such as starting it from the command prompt, but nothing has worked.
When I try to open, it gives me this error:
Traceback (most recent call last): File
"C:\Users\Avi\anaconda3\Scripts\jupyter-notebook-script.py", line 6,
in
from notebook.notebookapp import main
File
"C:\Users\Avi\anaconda3\lib\site-packages\notebook\notebookapp.py",
line 51, in
from zmq.eventloop import ioloop
File
"C:\Users\Avi\AppData\Roaming\Python\Python38\site-packages\zmq_init_.py",
line 47, in
from zmq import backend
File
"C:\Users\Avi\AppData\Roaming\Python\Python38\site-packages\zmq\backend_init_.py",
line 40, in
reraise(*exc_info)
File
"C:\Users\Avi\AppData\Roaming\Python\Python38\site-packages\zmq\utils\sixcerpt.py",
line 34, in reraise
raise value
File
"C:\Users\Avi\AppData\Roaming\Python\Python38\site-packages\zmq\backend_init_.py",
line 27, in
_ns = select_backend(first)
File
"C:\Users\Avi\AppData\Roaming\Python\Python38\site-packages\zmq\backend\select.py",
line 28, in select_backend
mod = import(name, fromlist=public_api)
File
"C:\Users\Avi\AppData\Roaming\Python\Python38\site-packages\zmq\backend\cython_init_.py",
line 6, in
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\Avi\AppData\Roaming\Python\Python38\site-packages\zmq\backend\cython_init_.py)
Try to create a conda environment 'test' with a specific python environment, activate the environment and then run jupyter notebook. On anaconda prompt run the below commands.
conda create -n test "python>=3.5,<3.8" ipython
conda activate test
jupyter notebook
When I try to launch Jupyter notebook through Anaconda, I get the following error message:
Traceback (most recent call last):
File "C:\Users\Michael\anaconda3\Scripts\jupyter-notebook-script.py", line 6, in
from notebook.notebookapp import main
File "C:\Users\Michael\AppData\Roaming\Python\Python37\site-packages\notebook\notebookapp.py", line 49, in
from zmq.eventloop import ioloop
File "C:\Users\Michael\AppData\Roaming\Python\Python37\site-packages\zmq\__init__.py", line 47, in
from zmq import backend
File "C:\Users\Michael\AppData\Roaming\Python\Python37\site-packages\zmq\backend\__init__.py", line 40, in
reraise(*exc_info)
File "C:\Users\Michael\AppData\Roaming\Python\Python37\site-packages\zmq\utils\sixcerpt.py", line 34, in reraise
raise value
File "C:\Users\Michael\AppData\Roaming\Python\Python37\site-packages\zmq\backend\__init__.py", line 27, in
_ns = select_backend(first)
File "C:\Users\Michael\AppData\Roaming\Python\Python37\site-packages\zmq\backend\select.py", line 28, in select_backend
mod = __import__(name, fromlist=public_api)
File "C:\Users\Michael\AppData\Roaming\Python\Python37\site-packages\zmq\backend\cython\__init__.py", line 6, in
from . import (constants, error, message, context,
ImportError: cannot import name 'constants' from 'zmq.backend.cython' (C:\Users\Michael\AppData\Roaming\Python\Python37\site-packages\zmq\backend\cython\__init__.py)
How do I go about fixing this? I already tried reinstalling Python and Jupyter (for what it's worth).
Try:
conda uninstall pyzmq
conda install pyzmq
or
pip uninstall pyzmq
pip install pyzmq
source: https://github.com/jupyter/notebook/issues/3435
(base) C:\Users\Aakash\anaconda3>jupyter notebook
Traceback (most recent call last):
File "C:\Users\Aakash\anaconda3\Scripts\jupyter-notebook-script.py", line 6, in
from notebook.notebookapp import main
File "C:\Users\Aakash\anaconda3\lib\site-packages\notebook\notebookapp.py", line 49, in
from zmq.eventloop import ioloop
File "C:\Users\Aakash\anaconda3\lib\site-packages\zmq__init__.py", line 47, in
from zmq import backend
File "C:\Users\Aakash\anaconda3\lib\site-packages\zmq\backend__init__.py", line 40, in
reraise(*exc_info)
File "C:\Users\Aakash\anaconda3\lib\site-packages\zmq\utils\sixcerpt.py", line 34, in reraise
raise value
File "C:\Users\Aakash\anaconda3\lib\site-packages\zmq\backend__init__.py", line 27, in
_ns = select_backend(first)
File "C:\Users\Aakash\anaconda3\lib\site-packages\zmq\backend\select.py", line 28, in select_backend
mod = import(name, fromlist=public_api)
File "C:\Users\Aakash\anaconda3\lib\site-packages\zmq\backend\cython__init__.py", line 6, in
from . import (constants, error, message, context,
ImportError: DLL load failed: The specified module could not be found.
Run these on anaconda prompt:
conda upgrade qt
OR
conda uninstall tornado
conda install tornado==6.0.4
OR
Check these previous answers
Anaconda Navigator Jupyter and Spyder won't start after successful installation
I get this error message all the time when i want to open jupyter notebook . I really appreciate if i get a help
Traceback (most recent call last):
File "C:\Users\NP\anaconda3\Scripts\jupyter-notebook-script.py", line 6, in <module>
from notebook.notebookapp import main
File "C:\Users\NP\AppData\Roaming\Python\Python37\site-packages\notebook\notebookapp.py", line 47, in <module>
from zmq.eventloop import ioloop
File "C:\Users\NP\AppData\Roaming\Python\Python37\site-packages\zmq\__init__.py", line 47, in <module>
from zmq import backend
File "C:\Users\NP\AppData\Roaming\Python\Python37\site-packages\zmq\backend\__init__.py", line 40, in <module>
reraise(*exc_info)
File "C:\Users\NP\AppData\Roaming\Python\Python37\site-packages\zmq\utils\sixcerpt.py", line 34, in reraise
raise value
File "C:\Users\NP\AppData\Roaming\Python\Python37\site-packages\zmq\backend\__init__.py", line 27, in <module>
_ns = select_backend(first)
File "C:\Users\NP\AppData\Roaming\Python\Python37\site-packages\zmq\backend\select.py", line 28, in select_backend
mod = __import__(name, fromlist=public_api)
File "C:\Users\NP\AppData\Roaming\Python\Python37\site-packages\zmq\backend\cython\__init__.py", line 6, in <module>
from . import (constants, error, message, context,
ImportError: cannot import name 'constants' from 'zmq.backend.cython' (C:\Users\NP\AppData\Roaming\Python\Python37\site-packages\zmq\backend\cython\__init__.py)
Is this your first time opening it up? If so, then you must have done something wrong in the installation. Try uninstalling and reinstalling properly or use google colab.
I actually stopped using jupyter notebook and started using google colab instead. It's much better, stores code in your google drive, you get free GPUs/TPUs and module installation is really easy and is a good alternative if you are unable to fix this.
You must have the same problem as stated here: https://github.com/jupyter/notebook/issues/3435
It should be conflicts made by conda and/or pip.
Try:
pip uninstall pyzmq
pip install pyzmq
I'm currently following the Scrapy tutorial and am at the step where there's a creation of a project, however this error is produced everytime I run the command scrapy startproject tutorial.
Error:
Traceback (most recent call last):
File "C:\Users\Me\Miniconda3\Scripts\scrapy-script.py", line 10, in <module>
sys.exit(execute())
File "C:\Users\Me\Miniconda3\lib\site-packages\scrapy\cmdline.py", line 149, in execute
cmd.crawler_process = CrawlerProcess(settings)
File "C:\Users\Me\Miniconda3\lib\site-packages\scrapy\crawler.py", line 252, in __init__
log_scrapy_info(self.settings)
File "C:\Users\Me\Miniconda3\lib\site-packages\scrapy\utils\log.py", line 149, in log_scrapy_info
for name, version in scrapy_components_versions()
File "C:\Users\Me\Miniconda3\lib\site-packages\scrapy\utils\versions.py", line 35, in scrapy_components_versions
("pyOpenSSL", _get_openssl_version()),
File "C:\Users\Me\Miniconda3\lib\site-packages\scrapy\utils\versions.py", line 43, in _get_openssl_version
import OpenSSL
File "C:\Users\Me\Miniconda3\lib\site-packages\OpenSSL\__init__.py", line 8, in <module>
from OpenSSL import crypto, SSL
File "C:\Users\Me\Miniconda3\lib\site-packages\OpenSSL\crypto.py", line 16, in <module>
from OpenSSL._util import (
File "C:\Users\Me\Miniconda3\lib\site-packages\OpenSSL\_util.py", line 6, in <module>
from cryptography.hazmat.bindings.openssl.binding import Binding
File "C:\Users\Me\Miniconda3\lib\site-packages\cryptography\hazmat\bindings\openssl\binding.py", line 13, in <module>
from cryptography.hazmat.bindings._openssl import ffi, lib
ImportError: DLL load failed: The specified procedure could not be found.
I suspected that the issue is in my installation of Scrapy, so I tried reinstalling Scrapy(first via pip then conda) but it still doesn't fix the problem. I then tried to install the packages that Scrapy needed(one by one) but it's still not fixing anything.
How do I go about fixing this?
Can you try to install Win64OpenSSL_Light-1_0_2h and reinstall cryptography?
pip install -I cryptography
See this existing answer.