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

How to switch/activate the conda env when the jupyterlab startup? #70

Open
potoo0 opened this issue Jun 24, 2021 · 1 comment
Open

How to switch/activate the conda env when the jupyterlab startup? #70

potoo0 opened this issue Jun 24, 2021 · 1 comment
Labels

Comments

@potoo0
Copy link

potoo0 commented Jun 24, 2021

I want activate user's own conda env when jupyterlab start up. So I put conda activate ENVNAMEcommand to .bashrc, but not working.

let's say activate py38_user2 for user2:

user2's bashrc

conda activate py38_user2

personal set up

  • OS: centos7
  • Version(s):
jupyter core     : 4.7.1
jupyter-notebook : 6.2.0
qtconsole        : not installed
ipython          : 7.24.1
ipykernel        : 5.5.5
jupyter client   : 6.1.11
jupyter lab      : 3.0.16
nbconvert        : 6.0.7
ipywidgets       : 7.6.3
nbformat         : 5.0.8
traitlets        : 5.0.5

conda env list:

# conda environments:
#
py38_user2                *  /home/user2/.conda/envs/py38_user2
base                               /u01/miniconda3

jupyterhub_config.py

c.Spawner.notebook_dir = '~/notebooks'
c.Spawner.default_url = '/lab'

c.LocalProcessSpawner.shell_cmd = ["bash", "-l", "-c"]
c.Spawner.args = ["--KernelSpecManager.ensure_native_kernel=False"]
c.JupyterHub.spawner_class = 'sudospawner.SudoSpawner'

c.PAMAuthenticator.open_sessions = False
c.LocalAuthenticator.create_system_users = True
c.PAMAuthenticator.add_user_cmd = ['adduser', '-m']

Is there any way to switch/activate the conda environment when the lab startup?

@potoo0 potoo0 added the bug label Jun 24, 2021
@welcome
Copy link

welcome bot commented Jun 24, 2021

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

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

No branches or pull requests

1 participant