question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How do I change which Python is used?

See original GitHub issue

My apologies if this is not specific to Jupyterlab App.

in a notebook within Jupyterlab App, when I run:

import sys
sys.executable

it returns '/usr/bin/python3'

I would like it to return '/usr/local/anaconda3/bin/python'

How do I specify which python Jupyterlab App uses?

Thank you!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:32 (11 by maintainers)

github_iconTop GitHub Comments

14reactions
sblivencommented, Sep 22, 2021

This is a pretty important feature. I need to access kernels from my system miniconda installation. Currently (at least on MacOS) I don’t see any options to import these, since the installer creates its own conda installation.

3reactions
sblivencommented, Oct 5, 2021

I got jupyterlab.app to recognize my existing jupyter environments! As @westurner mentioned, this requires installing nb_conda_kernels to the jupyterlab base environment. However, it’s a bit tricky on macOS since that environment is installed as root by default. I ran the following commands in a terminal:

source /Applications/JupyterLab.app/Contents/Resources/jlab_server/bin/activate
conda info  #ensure the right environment is loaded
sudo conda install nb_conda nb_conda_kernels

After restarting jupyter all conda environments were available as kernels.

Read more comments on GitHub >

github_iconTop Results From Across the Web

macos - How to change default Python version? - Stack Overflow
Double-click on the Path . You'll see path to one of the python installations, change that to path of your desired version.
Read more >
How to change from default to alternative Python version on ...
To change python version system-wide we can use update-alternatives python command. Logged in as a root user, first list all available ...
Read more >
How to Run Different Versions of Python From Your Terminal.
Run older version of Python at the same time as the default version. Useful for Kivy and other libraries that work with specific...
Read more >
The right and wrong way to set Python 3 as default on a Mac
Another thing not to try · Use Python 3 as the macOS default · Have Homebrew manage Python 3 · What if we...
Read more >
How to make Python 3 as your default "Python Version" on ...
Steps to Change the Default Python Version on Windows 10 to Python 3 · Open your command prompt and check the current Python...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found