Quick Retrieve on Google     Quick Retrieve on Bing

Combine Art and Sciences

Blogs transfered from: blog.csdn.net/sonictl

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

This blog is out of date and under examine. Check out my new blog holder: sonictl.github.io

本网站上的博文已经停止维护/更新了, 还在被审核。 请移步到新的博客空间:sonictl.github.io

How to add conda env into jupyter notebook installed by pip

ref: https://medium.com/@nrk25693/how-to-add-your-conda-environment-to-your-jupyter-notebook-in-just-4-steps-abeab8b8d084

If your linux server has no Anaconda installed but conda installed. You don't want to install Anaconda for just installing jupyter notebook. You just installed jupyter notebook with pip3 with this link

1. check the env on which jupyter notebook is runing:

which pip3
where pip3 #for windows cmd

2. add your Conda environment to your jupyter notebook:

Step 1: Create a Conda environment.

conda create --name firstEnv

once you have created the environment you will see some output after you create your environment.

Step 2: Activate the environment
After you activate it, you can install any package you need in this environment.

For example, I am going to install Tensorflow in this environment. The command to do so,

conda install -c conda-forge tensorflow

Step 3: install ipykernel

Now comes the step to set this conda environment on your jupyter notebook, to do so please install ipykernel.

conda install -c anaconda ipykernel

After installing this,

just type,

python -m ipykernel install --user --name=firstEnv

Using the above command, I will now have this conda environment in my Jupyter notebook.

Just check your Jupyter Notebook, to see the shining firstEnv under "new" list of jupyter first page.

the newer comer: jupyterLab


posted on 2021-06-15 21:03  sonictl  阅读(60)  评论(0编辑  收藏  举报