Sep-14-2023, 06:29 PM
(Sep-14-2023, 01:02 PM)snippsat Wrote:(Sep-14-2023, 11:56 AM)bytecrunch Wrote: Does choosing one kernel versus the other connect different environments to jupyter? Is that what is going on?No the are speareted,so have to install eg JupyterLab(which also install the kernel),in each environment.
There had been little point in virtual environment if the shared stuff馃К.
Can do quick demo,here a have oldermy_env
and newernew_env
envroment.
C:\Anaconda3 (base) 位 activate my_env C:\Anaconda3 (my_env) 位 jupyter --version Selected Jupyter core packages... IPython : 8.9.0 ipykernel : 6.21.1 ipywidgets : not installed jupyter_client : 7.4.9 jupyter_core : 5.2.0 jupyter_server : 2.2.1 jupyterlab : 3.6.1 nbclient : 0.7.2 nbconvert : 7.2.9 nbformat : 5.7.3 notebook : 6.5.2 qtconsole : 5.4.0 traitlets : 5.9.0 C:\Anaconda3 (my_env) 位 activate new_env conda.bat activate new_env C:\Anaconda3 (new_env) 位 jupyter --version Selected Jupyter core packages... IPython : 8.14.0 ipykernel : 6.23.1 ipywidgets : not installed jupyter_client : 8.2.0 jupyter_core : 5.3.0 jupyter_server : 2.6.0 jupyterlab : 4.0.1 nbclient : 0.8.0 nbconvert : 7.4.0 nbformat : 5.9.0 notebook : not installed qtconsole : not installed traitlets : 5.9.0 # Start JupyterLab from new_env C:\Anaconda3 (new_env) 位 jupyter labSo in browser can do.
import jupyterlab jupyterlab.__version__ 4.0.1If i start JupyterLab formy_env
it will show version 3.6.1.
For Editors/IDE most choice right environment,eg look at this post for VS Code.
If eg use Spyder you install it to the environment(do not use share one),then start if from command linespyder
.
Also a tip try to use command line much to get comfortable with it,many time i just run code from command line in the environment and not involving a editor(of just use to view code).
Then it also help to have something a lot better thancmd/PowerShell
like cmder(full)
Thank you snippsat! I fee like a have done what you describe in your examples. I have used the Anaconda terminal to:
a) create a new environment, (new_env)
b) install jupyter notebook inside of the environment itself
c) launched jupyter notebook from it which then opens up
However, without creating a jupyter kernel specific for that environment via:
(new_env) C:\Users\Brett\python_env\ conda install ipykernel # we install the package ipykernel inside the ven1 environment
(new_env) C:\Users\Brett\python_env\ ipython kernel install --user --name=ven1kernel # creates a new kernel
(new_env) (C:\Users\Brett\python_env\ jupyter kernelspec list #lists all jupyter kernels
then the jupyter notebook will NOT be able to access the modules inside the environment....correct?