Launching Spyder yields DLL importing error during `import zmq` - python

I receive the following error whenever I attempt to launch Spyder:
Traceback (most recent call last):
File "C:\Users\HP\anaconda3\Scripts\spyder-script.py", line 6, in
from spyder.app.start import main
File "C:\Users\HP\anaconda3\lib\site-packages\spyder\app\start.py", line 22, in
import zmq
File "C:\Users\HP\anaconda3\lib\site-packages\zmq\__init__.py", line 47, in
from zmq import backend
File "C:\Users\HP\anaconda3\lib\site-packages\zmq\backend\__init__.py", line 40, in
reraise(*exc_info)
File "C:\Users\HP\anaconda3\lib\site-packages\zmq\utils\sixcerpt.py", line 34, in reraise
raise value
File "C:\Users\HP\anaconda3\lib\site-packages\zmq\backend\__init__.py", line 27, in
_ns = select_backend(first)
File "C:\Users\HP\anaconda3\lib\site-packages\zmq\backend\select.py", line 28, in select_backend
mod = __import__(name, fromlist=public_api)
File "C:\Users\HP\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.
This is an Anaconda 3 installation on Windows. How can I get this to work correctly?

Related

Jupyter Notebook command prompt import error

I'm trying to start up the Jupyter Notebook application and it is not working at all.
I've tried opening it from the windows menu, a command prompt window opens up and closes.
I also tried running it from the anaconda command prompt and it gives me the following error:
(base) C:\Users\GG>jupyter notebook
Traceback (most recent call last):
File "C:\Users\GG\Anaconda3\Scripts\jupyter-notebook-script.py", line 6, in <module>
from notebook.notebookapp import main
File "C:\Users\GG\AppData\Roaming\Python\Python37\site-packages\notebook\notebookapp.py", line 47, in <module>
from zmq.eventloop import ioloop
File "C:\Users\GG\AppData\Roaming\Python\Python37\site-packages\zmq\__init__.py", line 47, in <module>
from zmq import backend
File "C:\Users\GG\AppData\Roaming\Python\Python37\site-packages\zmq\backend\__init__.py", line 40, in <module>
reraise(*exc_info)
File "C:\Users\GG\AppData\Roaming\Python\Python37\site-packages\zmq\utils\sixcerpt.py", line 34, in reraise
raise value
File "C:\Users\GG\AppData\Roaming\Python\Python37\site-packages\zmq\backend\__init__.py", line 27, in <module>
_ns = select_backend(first)
File "C:\Users\GG\AppData\Roaming\Python\Python37\site-packages\zmq\backend\select.py", line 28, in select_backend
mod = __import__(name, fromlist=public_api)
File "C:\Users\GG\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\GG\AppData\Roaming\Python\Python37\site-packages\zmq\backend\cython\__init__.py) ```
Any idea on how to fix this?

Jupyter Lab Not Opening

I am a beginner. Please help. When I pass the jupyter lab command the following error occurs:-
Traceback (most recent call last):
File "c:\users\parijat basak\anaconda3\lib\site-packages\jupyterlab_server\server.py", line 20, in <module>
from notebook.notebookapp import aliases, flags, NotebookApp as ServerApp
File "c:\users\parijat basak\anaconda3\lib\site-packages\notebook\notebookapp.py", line 51, in <module>
from zmq.eventloop import ioloop
File "C:\Users\Parijat Basak\AppData\Roaming\Python\Python38\site-packages\zmq\__init__.py", line 50, in <module>
from zmq import backend
File "C:\Users\Parijat Basak\AppData\Roaming\Python\Python38\site-packages\zmq\backend\__init__.py", line 40, in <module>
reraise(*exc_info)
File "C:\Users\Parijat Basak\AppData\Roaming\Python\Python38\site-packages\zmq\utils\sixcerpt.py", line 34, in reraise
raise value
File "C:\Users\Parijat Basak\AppData\Roaming\Python\Python38\site-packages\zmq\backend\__init__.py", line 27, in <module>
_ns = select_backend(first)
File "C:\Users\Parijat Basak\AppData\Roaming\Python\Python38\site-packages\zmq\backend\select.py", line 28, in select_backend
mod = __import__(name, fromlist=public_api)
File "C:\Users\Parijat Basak\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\Parijat Basak\AppData\Roaming\Python\Python38\site-packages\zmq\backend\cython\__init__.py)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\users\parijat basak\anaconda3\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\users\parijat basak\anaconda3\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\Parijat Basak\anaconda3\Scripts\jupyter-lab.EXE\__main__.py", line 4, in <module>
File "c:\users\parijat basak\anaconda3\lib\site-packages\jupyterlab\labapp.py", line 14, in <module>
from jupyterlab_server import slugify, WORKSPACE_EXTENSION
File "c:\users\parijat basak\anaconda3\lib\site-packages\jupyterlab_server\__init__.py", line 4, in <module>
from .app import LabServerApp
File "c:\users\parijat basak\anaconda3\lib\site-packages\jupyterlab_server\app.py", line 9, in <module>
from .server import ServerApp
File "c:\users\parijat basak\anaconda3\lib\site-packages\jupyterlab_server\server.py", line 26, in <module>
from jupyter_server.base.handlers import ( # noqa
ModuleNotFoundError: No module named 'jupyter_server'
Please help!!! I am unable to use Jupyter Lab anymore and it is extremly problematic for me!
Thank You.
From my point of view, it may be faster, and easier is to reinstall Jupyter Lab (maybe create a new conda environment if needed).
One more thing, you might consider backing up your conda environment when everything is smooth:
https://www.anaconda.com/blog/moving-conda-environments

Jupyter is not launching from anaconda navigator after clicking so many times and i got this error

After installing Jupyter, it is not launching from anaconda navigator after clicking multiples times but still, I get this following error:
Traceback (most recent call last):
File "C:\Users\ising\anaconda3\envs\ml_python_2020\lib\site-packages\jupyterlab_server\server.py", line 20, in
from notebook.notebookapp import aliases, flags, NotebookApp as ServerApp
File "C:\Users\ising\anaconda3\envs\ml_python_2020\lib\site-packages\notebook\notebookapp.py", line 51, in
from zmq.eventloop import ioloop
File "C:\Users\ising\AppData\Roaming\Python\Python38\site-packages\zmq\__init__.py", line 50, in
from zmq import backend
File "C:\Users\ising\AppData\Roaming\Python\Python38\site-packages\zmq\backend\__init__.py", line 40, in
reraise(*exc_info)
File "C:\Users\ising\AppData\Roaming\Python\Python38\site-packages\zmq\utils\sixcerpt.py", line 34, in reraise
raise value
File "C:\Users\ising\AppData\Roaming\Python\Python38\site-packages\zmq\backend\__init__.py", line 27, in
_ns = select_backend(first)
File "C:\Users\ising\AppData\Roaming\Python\Python38\site-packages\zmq\backend\select.py", line 28, in select_backend
mod = __import__(name, fromlist=public_api)
File "C:\Users\ising\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\ising\AppData\Roaming\Python\Python38\site-packages\zmq\backend\cython\__init__.py)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\ising\anaconda3\envs\ml_python_2020\Scripts\jupyter-lab-script.py", line 5, in
from jupyterlab.labapp import main
File "C:\Users\ising\anaconda3\envs\ml_python_2020\lib\site-packages\jupyterlab\labapp.py", line 14, in
from jupyterlab_server import slugify, WORKSPACE_EXTENSION
File "C:\Users\ising\anaconda3\envs\ml_python_2020\lib\site-packages\jupyterlab_server\__init__.py", line 4, in
from .app import LabServerApp
File "C:\Users\ising\anaconda3\envs\ml_python_2020\lib\site-packages\jupyterlab_server\app.py", line 9, in
from .server import ServerApp
File "C:\Users\ising\anaconda3\envs\ml_python_2020\lib\site-packages\jupyterlab_server\server.py", line 26, in
from jupyter_server.base.handlers import ( # noqa
ModuleNotFoundError: No module named 'jupyter_server'
You just need to do this step
pip uninstall pyzmq
and after that
pip install pyzmq
go back to your anaconda-navigator and try to launch Jupyter lab and it'll work fine

Conda Jupyer Notebook

After creating an environment in anaconda and installing tensorflow, I could not open Jupyter notebook, do I have to switch to base environment to open the notebook or I have done something wrong
D:\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 "D:\Anaconda3\Scripts\jupyter-notebook-script.py", line 6, in <module>
from notebook.notebookapp import main
File "D:\Anaconda3\lib\site-packages\notebook\notebookapp.py", line 47, in <module>
from zmq.eventloop import ioloop
File "D:\Anaconda3\lib\site-packages\zmq\__init__.py", line 47, in <module>
from zmq import backend
File "D:\Anaconda3\lib\site-packages\zmq\backend\__init__.py", line 40, in <module>
reraise(*exc_info)
File "D:\Anaconda3\lib\site-packages\zmq\utils\sixcerpt.py", line 34, in reraise
raise value
File "D:\Anaconda3\lib\site-packages\zmq\backend\__init__.py", line 27, in <module>
_ns = select_backend(first)
File "D:\Anaconda3\lib\site-packages\zmq\backend\select.py", line 28, in select_backend
mod = __import__(name, fromlist=public_api)
File "D:\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.

Neither Anaconda Navigator or Jupyter Notebook will open

I recently installed Anaconda on my Mac (running OS X 10.8.5), and I'm having several errors:
(1) When I try to open the Anaconda Navigator from the anaconda3 folder, the icon displays on my Dock then quickly disappears.
(2) When I use the command anaconda-navigator in terminal, it displays this error message:
Traceback (most recent call last):
File "/Users/jakesansom/anaconda3/lib/python3.6/site-packages/qtpy/__init__.py", line 166, in <module>
from PySide import __version__ as PYSIDE_VERSION # analysis:ignore
ModuleNotFoundError: No module named 'PySide'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/jakesansom/anaconda3/bin/anaconda-navigator", line 7, in <module>
from anaconda_navigator.app.main import main
File "/Users/jakesansom/anaconda3/lib/python3.6/site-packages/anaconda_navigator/app/main.py", line 22, in <module>
from anaconda_navigator.utils.conda import is_conda_available
File "/Users/jakesansom/anaconda3/lib/python3.6/site-packages/anaconda_navigator/utils/__init__.py", line 15, in <module>
from qtpy.QtGui import QIcon
File "/Users/jakesansom/anaconda3/lib/python3.6/site-packages/qtpy/__init__.py", line 172, in <module>
raise PythonQtError('No Qt bindings could be found')
qtpy.PythonQtError: No Qt bindings could be found
(3) When I use the command jupyter notebook in terminal, it displays this error message:
Traceback (most recent call last):
File "/Users/jakesansom/anaconda3/bin/jupyter-notebook", line 7, in <module>
from notebook.notebookapp import main
File "/Users/jakesansom/anaconda3/lib/python3.6/site-packages/notebook/notebookapp.py", line 45, in <module>
from zmq.eventloop import ioloop
File "/Users/jakesansom/anaconda3/lib/python3.6/site-packages/zmq/__init__.py", line 47, in <module>
from zmq import backend
File "/Users/jakesansom/anaconda3/lib/python3.6/site-packages/zmq/backend/__init__.py", line 40, in <module>
reraise(*exc_info)
File "/Users/jakesansom/anaconda3/lib/python3.6/site-packages/zmq/utils/sixcerpt.py", line 34, in reraise
raise value
File "/Users/jakesansom/anaconda3/lib/python3.6/site-packages/zmq/backend/__init__.py", line 27, in <module>
_ns = select_backend(first)
File "/Users/jakesansom/anaconda3/lib/python3.6/site-packages/zmq/backend/select.py", line 26, in select_backend
mod = __import__(name, fromlist=public_api)
File "/Users/jakesansom/anaconda3/lib/python3.6/site-packages/zmq/backend/cython/__init__.py", line 6, in <module>
from . import (constants, error, message, context,
ImportError: dlopen(/Users/jakesansom/anaconda3/lib/python3.6/site-packages/zmq/backend/cython/error.cpython-36m-darwin.so, 2): Symbol not found: _memset_s
Referenced from: /Users/jakesansom/anaconda3/lib/libsodium.23.dylib
Expected in: /usr/lib/libSystem.B.dylib
in /Users/jakesansom/anaconda3/lib/libsodium.23.dylib
I'm not sure if these issues are related or not, but I decided to post all of them just in case.

Categories

Resources