python环境配置

安装Miniconda

使用Miniconda一行代码配置Pytorch环境

Miniconda 镜像使用帮助

wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-latest-Linux-x86_64.sh
Do you wish the installer to initialize Miniconda3
by running conda init? [yes|no]
[no] >>> yes
no change /home/lazy/miniconda3/condabin/conda
no change /home/lazy/miniconda3/bin/conda
no change /home/lazy/miniconda3/bin/conda-env
no change /home/lazy/miniconda3/bin/activate
no change /home/lazy/miniconda3/bin/deactivate
no change /home/lazy/miniconda3/etc/profile.d/conda.sh
no change /home/lazy/miniconda3/etc/fish/conf.d/conda.fish
no change /home/lazy/miniconda3/shell/condabin/Conda.psm1
no change /home/lazy/miniconda3/shell/condabin/conda-hook.ps1
no change /home/lazy/miniconda3/lib/python3.8/site-packages/xontrib/conda.xsh
no change /home/lazy/miniconda3/etc/profile.d/conda.csh
modified /home/lazy/.bashrc
==> For changes to take effect, close and re-open your current shell. <==
If you'd prefer that conda's base environment not be activated on startup,
set the auto_activate_base parameter to false:
conda config --set auto_activate_base false
Thank you for installing Miniconda3!

tf环境

conda create -n tf-cpu python=3.8

下载2.3版本

pip install --upgrade --ignore-installed tensorflow

jupyter

Jupyter Notebook介绍、安装及使用教程

enum — 对枚举的支持

不可变对象:如 数字,元组,字符串;

可变对象:如 列表,字典。

Python函数值传递与引用传递

它们之间最本质的区别就是在进行参数传递以后改变形式参数的值不同。

在值传递中,不改变形式参数的值,而在引用传递中,形式参数的值是被改变的

Leave a comment

Your email address will not be published. Required fields are marked *