Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named 'zmq.asyncio' #6329

Open
dip16gphy opened this issue Apr 1, 2022 · 2 comments
Open

ModuleNotFoundError: No module named 'zmq.asyncio' #6329

dip16gphy opened this issue Apr 1, 2022 · 2 comments

Comments

@dip16gphy
Copy link

I am trying to open jupyter notebook in obspy environment, but it keeps throwing the same error again and again even after updating all the packages & reinstalling the notebook. I have pyzmq 22.3.0.

Here is the error:

Traceback (most recent call last):
File "C:\Users\UPLC\anaconda3\envs\obspy\Scripts\jupyter-notebook-script.py", line 5, in
from notebook.notebookapp import main
File "C:\Users\UPLC\anaconda3\envs\obspy\lib\site-packages\notebook\notebookapp.py", line 78, in
from .services.kernels.kernelmanager import MappingKernelManager, AsyncMappingKernelManager
File "C:\Users\UPLC\anaconda3\envs\obspy\lib\site-packages\notebook\services\kernels\kernelmanager.py", line 18, in
from jupyter_client.session import Session
File "C:\Users\UPLC\anaconda3\envs\obspy\lib\site-packages\jupyter_client_init_.py", line 6, in
from .asynchronous import AsyncKernelClient # noqa
File "C:\Users\UPLC\anaconda3\envs\obspy\lib\site-packages\jupyter_client\asynchronous_init_.py", line 1, in
from .client import AsyncKernelClient # noqa
File "C:\Users\UPLC\anaconda3\envs\obspy\lib\site-packages\jupyter_client\asynchronous\client.py", line 6, in
from jupyter_client.channels import HBChannel
File "C:\Users\UPLC\anaconda3\envs\obspy\lib\site-packages\jupyter_client\channels.py", line 12, in
import zmq.asyncio
ModuleNotFoundError: No module named 'zmq.asyncio'

@minrk
Copy link
Member

minrk commented Apr 1, 2022

If you don't have zmq.asyncio, you don't actually have pyzmq 22.3, or the install was corrupted somehow. Reinstalling may help:

conda install -n obspy pyzmq

To diagnose, try:

conda list -n obspy

or in Python:

import zmq
print(zmq.__version__, zmq.__file__)

Those might give you a hint about what's amiss.

@elcolie
Copy link

elcolie commented Sep 1, 2023

FYI: With Python 3.11.3 I don't have this problem.
But when I use 3.10.9 I got this error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants