【深耕 Python】Data Science with Python 数据科学(1)环境搭建

一、操作系统

使用运行在Windows11主机上的Ubuntu 22.04虚拟机,虚拟化平台为Oracle VM VirtualBox。

二、PyCharm安装

有关PyCharm的安装和快捷方式创建,可分别参考我的博客
Ubuntu安装PyCharm
Ubuntu创建桌面快捷方式
,以及Ubuntu创建桌面快捷方式时出现的问题及解决方法

三、环境搭建

命令(此处选择在PyCharm自带终端中执行):
若无法打开终端,可以参考我的博客解决Ubuntu新装系统终端打不开

cd ~/Desktop
mkdir repos
cd repos
mkdir python_data_science
cd python_data_science
python3 -m venv venv
source venv/bin/activate

在这里插入图片描述

四、依赖包安装

此处安装numpy, matplotlib, pandas, scikit-learn和jupyter notebook.
命令:

pip install numpy==1.23.3
pip install matplotlib==3.6.1
pip install pandas==1.5.0
pip install scikit-learn==1.1.2
pip install jupyterlab==3.4.8

安装过程截图:

numpy:

在这里插入图片描述

matplotlib:

在这里插入图片描述

pandas:

在这里插入图片描述

scikit-learn:

在这里插入图片描述

jupyter notebook (jupyterLab):

在这里插入图片描述

五、参考文献

《Learn Enough Python to be Dangerous——Software Development, Flask Web Apps, and Beginning Data Science with Python》, Michael Hartl, Boston, Pearson, 2023.

3.27更新

搭建环境过程中,在执行命令python3 -m venv venv之前,需要先确保安装有python3-venv包,安装命令如下:

sudo apt-get install python3-venv
  • 18
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

不是AI

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值