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

Bug fixed when adding multiple custom conda envs in Jupyter #69

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

imohammad12
Copy link

Issue #, if available:

Description of changes:

Deactivating custom Conda env added in the loop when adding each custom env as a kernel in Jupyter.

More details:
I think each env should be deactivated after being added as a kernel in Jupyter.
The previous version causes the following error for me when I have multiple custom Conda environments. Just the first custom Conda environment in the loop is added correctly. Note that all custom Conda environments will appear on Jupyter, but not all of them work correctly.
The error in terminal:
Could not find Conda environment: "name_of_the_custom_conda_env"

Testing Done

  • Done Notebook Instance created successfully with the Lifecycle Configuration
  • Done Notebook Instance stopped and started successfully
  • Documentation in the script around any network access requirements
  • Documentation in the script around any IAM permission requirements
  • CLI commands used to validate functionality on the instance
  • New script link and description added to README.md
# Provide your commands here
/you/commands/here

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

I think each env should be deactivated after being added as a  kernel in Jupyter.
The previous version causes the following error for me when I have multiple custom Conda environments. Just the first custom Conda environment in the loop is added correctly. Note that all custom Conda environments will appear on Jupyter, but not all of them work correctly.
The error in terminal:
Could not find Conda environment: "name_of_the_custom_conda_env"
@@ -22,6 +22,7 @@ for env in $WORKING_DIR/miniconda/envs/*; do
BASENAME=$(basename "$env")
source activate "$BASENAME"
python -m ipykernel install --user --name "$BASENAME" --display-name "Custom ($BASENAME)"
conda deactivate
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be consistent, update this to be source deactivate - @imohammad12

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

Successfully merging this pull request may close these issues.

2 participants