擅长:python、mysql、java
<p>您可以:</p>
<pre><code>conda create —name py2 python=2.7 anaconda
conda activate py2
(py2) conda install ipykernel -y
(py2) python -m ipykernel install user name py2 display-name "Python 2.7"
</code></pre>
<p>这将使用python2.7创建一个名为py2的环境,并将其添加到名为python2.7的内核中</p>
<p>如果我们还想拥有其他版本,例如Python 3.7,我们可以执行相同的步骤:</p>
^{pr2}$
<p>注意:您不必添加“Python”包。希望这能帮助您理解如何向jupyter内核添加环境。在</p>
<p>参见:<a href="https://ipython.readthedocs.io/en/stable/install/kernel_install.html" rel="nofollow noreferrer">Anaconda Documentation</a></p>