Linux environment operation
1. Download anaconda
vim ~/.bashrc
export PATH="/root/miniconda3/bin:"$PATH
source ~/.bashrc
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/
conda config --set show_channel_urls yes
conda config --get channels
添加新的文件源,换成清华大学的
2. Conda export environment
conda env list
conda env export > environment.yaml
conda env create -n env_name -f env.yaml
3. Conda creates a new environment
conda create -n test python=3.7.1
conda env create -f environment.yml
4. pip creates and exports a new environment
pip freeze > 27.txt
pip install -r 27.txt
5. pytorch version installation
pytorch version list
6. Install cpython through the channel
pip install cython==0.29.24 -i https://mirrors.aliyun.com/pypi/simple/
7. Transfer files by specifying the port of the other party through SCP
scp -P 5896333332 requirement.txt wuxi@3336.1368.1780.246:/data/wuxi
8. Release the cache in the server
free the cache in the server