当前位置:网站首页>[Anaconda environmental management and package management]
[Anaconda environmental management and package management]
2022-07-23 11:04:00 【mandala -chen】
Anaconda Environmental management and package management
1、 Relative path and absolute path
1、 Why can't the file be found when writing a program (The file is not found)
Read the program file ——————> Compared to the material transmission between two people
Put one folder after another ——————> Compared to small rooms
Material transmission should be face-to-face Only two people in the same room can carry out material transmission
When it comes to cross room material transfer You need to know the room number when you get there ( Address )
Relative address ————————>( Which room in front of us , There is a house next to us )
Absolute address ————————>( On which floor, in the small room )
environment variable ————————>( amount to The exact location of this room was posted downstairs , All the material transfer based on this room You don't have to go to this room to do it again. You can do it in a way similar to takeout )
1、 stay Anaconda Install the package in Anaconda prompt
2、conda Environmental management package and environment
conda And pip brief introduction
conda It's a python package , Dependency and environmental management tools , For multiple languages , Such as : Python, R, Scala, Java, Javascript, C/ C++, FORTRAN
pip yes Python Package management tools , The tool provides the right Python Bag search 、 download 、 install 、 Uninstalled features . At present, if you are in python.org Download the latest version of the installation package
Command format
Instruction names Parameters Parameter values
conda View virtual environment
conda env list
conda Creating a virtual environment :
conda create -n your_env_name python=X.X
conda Enter the virtual environment :
conda activate ss
conda Exit virtual environment :
conda deactivate
conda Delete environment :
conda remove -n name --all
View installed packages
conda list
conda Installation package
conda install package
Install the specified version of the package :
conda install package=xx
Upgrade package :
conda update spyder
conda Uninstall package
conda uninstall xxx
Found that the package installation speed is too slow ?——> Configure image source
3、conda/pip Configure mirror source :
conda Change Tsinghua source tutorial
1、 open Anaconda prompt Enter the following command in it
conda config --set show_channel_urls yes
After executing the command, it will generate .condarc file 
Open in Notepad .condarc Delete the original contents, copy and paste the following contents and save
channels:
- defaults
show_channel_urls: true
default_channels:
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
custom_channels:
conda-forge: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
msys2: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
bioconda: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
menpo: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
simpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
Run the following command to clear the cache
conda clean -i
conda View software source :
conda config --show-sources
pip Change Tsinghua source tutorial
open Anaconda prompt Enter the following command in it
pip install pip -U
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
4、anaconda jupyter Multi core switch management
anconda jupyter Multi kernel management refers to Only default base Installation in environment jupyter Install... In a virtual environment jupyter kernel , Can be directly in jupyter Switch kernel to use virtual environment There is no need to manually activate the environment to switch
step
Start by opening anconda promt terminal In the default environment (base) Next Use the following command to install the plug-in
conda install nb_conda_kernelos
Create a virtual environment
conda create -n your_env_name
Enter your newly created virtual environment
conda activate your_env_name
Install the required packages in the virtual environment ( If you want to install other languages, you can install other languages kernel ) And install ipykernel Two bags
conda install ipykernel
remind
If an error is reported, please check that the user directory is in Chinese And make sure you are in your default environment And virtual environment ipykernel The versions of are consistent
If the following appears, it means success 

边栏推荐
- SPR:SUPERVISED PERSONALIZED RANKING BASED ON PRIOR KNOWLEDGE FOR RECOMMENDATION
- C language n battle -- structure (VII)
- SVG, canvas, drawing line segments and filling polygon, rectangle, curve drawing and filling
- adb常用命令
- Redis源码与设计剖析 -- 7.快速列表
- 9、光线追踪
- CountDownLatch的用法
- 7. Texture mapping
- 52832Dongle的安装
- Redis source code and design analysis -- 12. Collection objects
猜你喜欢

Updated again, idea 2022.2 officially released

结构体详解

6. Barycentric coordinate interpolation and graphics rendering pipeline

Mysql的索引为什么用的是B+树?

Redis源码与设计剖析 -- 13.有序集合对象

Two strategies for building AI products / businesses (by Andrew ng)

Activiti工作流使用之新建bpmn文件

Gerrit 使用操作手册

Heidelberg CP2000 circuit board maintenance printer host controller operation and maintenance precautions

Fundamentals of software testing - design method of test cases
随机推荐
Data Lake: introduction to Apache iceberg
C language n battle -- structure (VII)
52832Dongle的安装
Redis源码与设计剖析 -- 7.快速列表
Concepts and differences of bit, bit, byte and word
【信息系统项目管理师】第六章 复盘进度管理知识架构
C语言n番战--结构体(七)
Gerrit 使用操作手册
手风琴效果
ShardingSphere分库分表方案
村田muRata电源维修交换机服务器电源维修及主要功能特点
Activiti工作流使用之Activiti-app的安装及流程创建
Redis源码与设计剖析 -- 6.压缩列表
Redis源码与设计剖析 -- 12.集合对象
adb常用命令
[visual slam] orb slam: tracking and mapping recognizable features
What does resource pooling and resource pooling mean?
《天幕红尘》笔记与思考(四)相互价值无效
Redis源码与设计剖析 -- 10.列表对象
Redis源碼與設計剖析 -- 7.快速列錶