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

Looking in wrong place to activate a virtualenv #42

Open
RNarayan73 opened this issue Sep 3, 2023 · 0 comments
Open

Looking in wrong place to activate a virtualenv #42

RNarayan73 opened this issue Sep 3, 2023 · 0 comments

Comments

@RNarayan73
Copy link

Versions:
Python: 3.10
Jupyter Notebook: 6.5.4

I am trying to select a virtualenv_eda310 kernel in a jupyter notebook. The virtualenv environments installed were correctly recognised by jupyter_environment_kernels at startup.

The kernel itself seems to load correctly in the notebook:
image

But none of the external libraries installed in the virtualenv can be loaded in the notebook. When viewed in the notebook, the console shows the following error:

[W 15:22:14.563 NotebookApp] Kernelspec name virtualenv_eda310 cannot be found!
[E 15:22:14.588 NotebookApp] Couldn't get environment variables for commands: ['C:\Users\naray/Python/venvs\eda310\Shell\activate']
Traceback (most recent call last):
File "C:\Users\naray\Python\venvs\jupy310\lib\site-packages\environment_kernels\envs_virtualenv.py", line 44, in _get_env_vars_for_virtualenv_env
envs = source_env_vars_from_command(args)
File "C:\Users\naray\Python\venvs\jupy310\lib\site-packages\environment_kernels\activate_helper.py", line 57, in source_env_vars_from_command
return source_cmd(args)
File "C:\Users\naray\Python\venvs\jupy310\lib\site-packages\environment_kernels\activate_helper.py", line 94, in source_cmd
raise RuntimeError("Command not found: %s" % args[0])
RuntimeError: Command not found: C:\Users\naray/Python/venvs\eda310\Shell\activate
[I 15:22:14.617 NotebookApp] Kernel started: 4a5cd807-d19a-4c5b-99fa-cbafe3dff5c1, name: virtualenv_eda310
[I 15:22:22.204 NotebookApp] Starting buffering for 4a5cd807-d19a-4c5b-99fa-cbafe3dff5c1:142fb0addac144449ac94eec560718cc
[I 15:22:22.207 NotebookApp] Restoring connection for 4a5cd807-d19a-4c5b-99fa-cbafe3dff5c1:142fb0addac144449ac94eec560718cc

The activate command is installed into the Scripts folder within the virtual environment, but jupyter_environment_kernels is looking for it in the Shell folder.

Can you please investigate and resolve?

Thanks,

Narayan

@RNarayan73 RNarayan73 changed the title Looking in wrong place for activate in virtualenv Looking in wrong place to activate a virtualenv Sep 16, 2023
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

1 participant