conda环境安装sklearn
时间: 2023-08-08 12:13:15 浏览: 543
sklearn安装.txt
要在conda虚拟环境中安装sklearn,可以按照以下步骤进行操作:
1. 创建一个名为sklearn的虚拟环境,并指定Python版本为3.6.5:
```
conda create -n sklearn python=3.6.5
```
2. 激活sklearn虚拟环境:
```
conda activate sklearn
```
3. 在sklearn虚拟环境中按照以下顺序安装所需的包:
```
conda install numpy
conda install pandas
conda install scipy
conda install matplotlib
conda install scikit-learn==0.20.0
```
4. 在jupyter notebook中运行sklearn虚拟环境,可以按照以下步骤进行操作:
- 首先,确保已经在sklearn虚拟环境中。
- 安装ipykernel包:
```
conda install ipykernel
```
- 在jupyter notebook中为该虚拟环境取一个名字,例如"sklearn-notebook":
```
python -m ipykernel install --name sklearn-notebook
```
总结来说,sklearn是scikit-learn的简称,是一个基于Python的第三方库,集成了一些常用的机器学习方法。要在conda环境中安装sklearn,需要创建一个sklearn虚拟环境,并按照指定的顺序安装所需的包。然后,在jupyter notebook中运行该虚拟环境。这样就可以在虚拟环境中使用sklearn库进行机器学习建模了。\[1\]\[2\]\[3\]
#### 引用[.reference_title]
- *1* *2* [用conda虚拟环境安装sklearn](https://blog.csdn.net/weixin_44753371/article/details/103902751)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [conda虚拟环境下sklearn库安装避雷](https://blog.csdn.net/Angeldream123/article/details/126767827)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文