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 - Jupyter Kernel Gateway #4891

Closed
bajajanshul1 opened this issue Jan 4, 2025 · 8 comments
Closed

ModuleNotFoundError - Jupyter Kernel Gateway #4891

bajajanshul1 opened this issue Jan 4, 2025 · 8 comments

Comments

@bajajanshul1
Copy link

What happened?

Hi Team ,

Recently I've been getting a Jupyter_kernel_gateway ModuleNotFoundError. Has something changed recently in last couple of weeks which is causing this error. I use '!pip install autogen' and '!pip install 'pyautogen[jupyter-executor]'' to work with autogen library. Please see attached image for error desription and source. Request a help on this as soon as possible.Image

What did you expect to happen?

No error message

How can we reproduce it (as minimally and precisely as possible)?

use import statement :
Image

from autogen.coding.jupyter import JupyterCodeExecutor , LocalJupyterServer

AutoGen version

Name: autogen Version: 0.6.1

Which package was this bug in

Core

Model used

No response

Python version

No response

Operating system

No response

Any additional info you think would be helpful for fixing this bug

No response

@Leon0402
Copy link
Contributor

Leon0402 commented Jan 4, 2025

Wrong repo to start with :-)

Don't ask me why, but there is a fork of autogen v2 called ag2 https://github.com/ag2ai/ag2. And the pip package autogen, pyautogen and ag2 are both from that repository.

This repository on the other hand is available as https://pypi.org/project/autogen-agentchat/.

@Leon0402
Copy link
Contributor

Leon0402 commented Jan 4, 2025

As to why it is happening. There was a change a few days ago with this import:
ag2ai/ag2@ecf77c5

I am not sure if this import is valid itself. But as a first debugging strategy you could have a look whether jupyter_kernel_gateway is installed in your virtual env. E.g. with pip list. Best from the notebook you are executing to make sure that you actually use your env.

@bajajanshul1
Copy link
Author

Thanks for Quick response Leon. Using '!pip install 'pyautogen[jupyter-executor]'' ' it gets installed as :
jupyter-kernel-gateway in /opt/conda/lib/python3.10/site-packages (from pyautogen[jupyter-executor]) (3.0.1) . Please have a look at attached txt file for complete log.

Jupyter_kernel_gateway.txt

Using pip list I can see : jupyter-kernel-gateway version 3.0.1 .

However when go to folder where site packages get installed. it only shows as in attached picture here.Image that there is no .py file.

Any thoughts on this. And would you advise to open an issue on the another repo.

@bajajanshul1
Copy link
Author

Just posted on ag2ai/ag2#353

@Leon0402
Copy link
Contributor

Leon0402 commented Jan 4, 2025

Yeah, I just did a quick test and I think import jupyter_kernel_gateway does not work. The package does not provide a python package with that name (it is also not documented anywhere as far as I can see).

Yes you should open the issue in the other repo (or switch to this autogen version here)

@bajajanshul1
Copy link
Author

bajajanshul1 commented Jan 4, 2025

Thanks Leon. closing from here .I'll track posted on ag2ai/ag2#353 . It would take some time to me to switch autogen version here.

@Leon0402
Copy link
Contributor

Leon0402 commented Jan 4, 2025

Thanks Leon. closing from here .I'll track posted on ag2ai/ag2#353 . It would take some time to me to switch autogen version here.

They are pretty much the same, when you take the v0.2 version: https://github.com/microsoft/autogen/releases/tag/v0.2.40, which is still supported.

@ekzhu
Copy link
Collaborator

ekzhu commented Jan 4, 2025

@Leon0402 many thanks!

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

No branches or pull requests

3 participants