Fedora简介
Fedora是一个基于Linux的开源操作系统,由Red Hat公司发起和维护,它是一个免费且开源的操作系统,支持多种硬件平台,提供了丰富的软件包和工具,方便用户进行软件开发、系统管理和数据处理等任务,在Fedora上搭建Jupyter和数据科学环境,可以方便地进行数据分析、可视化和机器学习等工作,本文将详细介绍如何在Fedora上搭建Jupyter和数据科学环境。
安装Python和pip
1、更新系统软件包:
sudo dnf update
2、安装Python:
sudo dnf install python39
3、验证Python安装:
python3 --version
4、安装pip:
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py sudo python3 get-pip.py
5、验证pip安装:
pip3 --version
安装Jupyter Notebook
1、创建虚拟环境:
python3 -m venv myenv
2、激活虚拟环境:
source myenv/bin/activate
3、使用pip安装Jupyter Notebook:
pip install jupyter notebook
4、启动Jupyter Notebook:
jupyter notebook --ip=0.0.0.0 --port=8888 --no-browser --allow-root --NotebookApp.token='' --NotebookApp.password='' --NotebookApp.base_url='/tree?token=' &> /dev/null & disown %1 在后台启动Jupyter Notebook,并将其与终端分离,避免阻塞终端操作
5、打开浏览器,访问Jupyter Notebook:http://localhost:8888,输入之前设置的密码(默认为空)登录。
安装数据科学相关库和工具(以conda为例)
1、安装Anaconda或Miniconda:请访问https://www.anaconda.com/products/distribution 下载并安装适合您的操作系统的Anaconda或Miniconda版本,安装完成后,请确保将Anaconda或Miniconda添加到系统的PATH环境变量中。
2、创建一个新的conda环境(可选):为了避免不同项目之间的依赖冲突,建议为每个项目创建一个新的conda环境,创建一个名为datascience的环境:
conda create -n datascience python=3.7 pandas numpy matplotlib seaborn scikit-learn jupyterlab ipython tensorflow jupyter_contrib_nbextensions jupyter_nbextensions_configurator jupyter_nbextensions_common jupyter_nbextensions_codefolding plotly_express pillow pytorch torchvision xgboost opencv-python librosa librosa-model-parallel librosa-inference-io librosa-display librosa-style librosa-util zlib_compression zstd_compression lzma lzma_frames lzma_block cmake cffi cffi-compiler cffi-devel cairo cairocffi cairosvg pandoc imagemagick fontconfig freetype gdk-pixbuf glib2 gobject-introspection gobject-query libepoxy libpng16 libpng16-devel libtiff libtiff-devel libjpeg libjpeg-turbo libjpeg-devel libwebp libwebp-devel libvpx libvpx-devel libavcodec libavcodec-devel libavformat libavformat-devel libavutil libavutil-devel libavfilter libavfilter-devel libswscale libswscale-devel libdc1394 libdc1394-devel librawlite librawlite-devel libexiftool exiftool gstreamer1 gstreamer1-plugins-base gstreamer1-plugins-good gstreamer1-plugins-ugly gstreamer1-plugins-bad gstreamer1-libav gstreamer1-vaapi gstreamer1-v4l2 gstreamer1-x v4l2ucp v4l2videocodec ffmpeg ffmpeg-devel ffplay ffplay-devel avconv avconv-devel avimux avimux-devel pulseaudio pulseaudio-alsa pulseaudio-jack pulseaudio-gnome pulseaudio-bspwm pulseaudio-bluetooth alsa-utils alsa-lib alsa-libresample alsa-utils alsa-utils alsa-soundcard alsa-soundcard alsa-utils alsa-utils alsa-utils alsa-utils alsa-utils alsa-utils alsa-utils alsa-utils alsa-utils alsa-utils alsa-utils alsa-utils alsa
原创文章,作者:K-seo,如若转载,请注明出处:https://www.kdun.cn/ask/160820.html