赞
踩
win11 安装 Anaconda(2022.10)+pycharm(2022.3/2023.1.4)+配置虚拟环境
Jupyter 是 Anaconda 发行版的一部分,并默认随 Anaconda 一起安装。 (也可以独立安装和使用,无需依赖 Anaconda)
pip install jupyter notebook
conda install jupyter
Jupyter
usage: jupyter [-h] [--version] [--config-dir] [--data-dir] [--runtime-dir] [--paths] [--json] [--debug] [subcommand]
Jupyter: Interactive Computing
positional arguments:
subcommand the subcommand to launch
optional arguments:
-h, --help show this help message and exit
--version show the versions of core jupyter packages and exit
--config-dir show Jupyter config dir
--data-dir show Jupyter data dir
--runtime-dir show Jupyter runtime dir
--paths show all Jupyter paths. Add --json for machine-readable format.
--json output paths as machine-readable json
--debug output debug information about paths
Available subcommands: bundlerextension console dejavu events execute kernel kernelspec lab labextension labhub
migrate nbclassic nbconvert nbextension notebook qtconsole run script server serverextension troubleshoot trust
Please specify a subcommand or one of the optional arguments.
前文介绍了PyCharm配置Anaconda中的Jupyter:
【2023最新版】PyCharm配置 Jupyter Notebook详解(启动、设置密码、测试等)
本文将介绍了PyCharm使用conda虚拟环境中的Jupyter
conda create -n csdn python==3.10
注意,python最新版可能无法使用conda命令安装Jupyter,建议不要安装最新版
Proceed ([y]/n)?
敲enter
直接安装即可即可
conda activate csdn
conda list
conda create -n csdn python
注意:如果更新千万千万千万不要中途停止!!!,个人建议不要更新
创建conda虚拟环境时,如果提示:
Collecting package metadata (current_repodata.json): done
Solving environment: done
==> WARNING: A newer version of conda exists. <==
current version: 23.7.2
latest version: 23.9.0
Please update conda by running
$ conda update -n base -c defaults conda
Or to minimize the number of packages updated during conda update use
conda install conda=23.9.0
当前使用的Conda版本为23.7.2,而最新版本是23.9.0。建议你通过运行以下命令来更新Conda:
conda update -n base -c defaults conda
或者,如果你想在更新Conda时减少更新的软件包数量,可以使用以下命令:
conda install conda=23.9.0
conda错乱了……
结束上述操作后,环境变为csdn
尚未安装Jupyter~那肯定会运行失败,如图:
上述添加canda环境操作结束后,重启PyCharm,自动检测出Jupyter未安装
,点击右侧安装Jupyter
即可
等待安装结束即可:
更新conda中途停止的下场:
conda activate E:\Software\anaconda3\envs\csdn
E:\Software\anaconda3\condabin\conda.bat install -p E:/Software/anaconda3/envs/csdn jupyter -y
额……python最新版3.12使用conda命令安装时等待n久,此题无解,不要使用最新版python
(可以尝试pip安装,这里未进行测试)
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: \
conda create -n csdn1 python==3.10
conda activate csdn1
conda install jupyter
successful
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。