当前位置:网站首页>CONDA common commands: install, update, create, activate, close, view, uninstall, delete, clean, rename, change source, problem
CONDA common commands: install, update, create, activate, close, view, uninstall, delete, clean, rename, change source, problem
2022-07-25 12:49:00 【Full stack programmer webmaster】
Hello everyone , I meet you again , I'm your friend, Quan Jun .
List of articles
- download
- install
- upgrade
- uninstall Anaconda Software
- conda The environment uses basic commands
- Check the installable version information of the specified package
- to update , Uninstall the installation package :
- Delete virtual environment
- clear (conda Slimming )
- Copy / rename / Delete env Environmental Science
- conda Auto on / Turn off activation
- Conda Install local package
- solve conda/pip install Slow download speed
- pip and conda Batch export 、 Installation of components (requirements.txt)
- Common software installation
- problem
- 1:failed ERROR conda.core.link:_execute(502):
- 2.anaconda or conda Not an internal command
- 3.conda Create an environment with errors :NotWritableError: The current user does not have write permissions to a required path.
- 4.conda Create an environment with errors :Collecting package metadata (current_repodata.json): failed ProxyError: Conda cannot proceed due to an error in your proxy configuration.
download
Go directly to anaconda Download the installation file on the official website , Search the specific website by yourself . Provided on the official website linux edition ,windows edition ,mac edition . At the same time provide Anaconda The full version and miniconda Minimum version ( Without software interface , Only command line execution is supported ), Recommended for novices Anaconda edition , It is recommended to use miniconda edition , It takes up less storage space , It feels the same when used .
install
linux Environmental Science
bash Anaconda3-2019.07-Linux-x86_64.sh
#yes+ enter
# And then restart terminalwindow Environmental Science : Double click Install directly exe file , Then install according to the installation wizard
upgrade
upgrade Anaconda You need to upgrade first conda
conda update conda # Basic upgrade
conda update anaconda # Big upgrade
conda update anaconda-navigator //update Latest version anaconda-navigator uninstall Anaconda Software
because Anaconda The installation files of are contained in a directory , So delete the directory directly . Delete the whole Anaconda Catalog :
Computer control panel -> Program and Application -> uninstall //windows
perhaps
find C:\ProgramData\Anaconda3\Uninstall-Anaconda3.exe Perform the uninstall
rm -rf anaconda //ubuntuLast , It is suggested to clean up .bashrc Medium Anaconda route .
conda The environment uses basic commands
conda update -n base conda #update Latest version conda
conda create -n xxxx python=3.5 # establish python3.5 Of xxxx A virtual environment
conda activate xxxx # Turn on xxxx Environmental Science
conda deactivate # Shut down the environment
conda env list # Show all virtual environments
conda info --envs # Show all virtual environments Check the installable version information of the specified package
Reference resources :https://blog.csdn.net/qq_35203425/article/details/79965389 see tensorflow Versions :( Check it out and you'll find a lot of TensorFlow Source , But you can't just choose , Select to use the find command to locate )
anaconda search -t conda tensorflow Check the installable version information of the specified package
anaconda show <USER/PACKAGE> View specified anaconda/tensorflow Version information
anaconda show tensorflowThe output will provide a download address , Use the following command to specify the installation of 1.8.0 edition tensorflow
conda install --channel https://conda.anaconda.org/anaconda tensorflow=1.8.0 to update , Uninstall the installation package :
conda list # View installed packages
conda list -n xxx # Specify view xxx Installed in virtual environment package
conda update xxx # to update xxx Package
conda uninstall xxx # uninstall xxx Package Delete virtual environment
conda remove -n xxxx --all // establish xxxx A virtual environment clear (conda Slimming )
conda clean It can be done easily ! First step : adopt conda clean -p To delete some useless bags , This command will check which packages are not hard dependent elsewhere in the package cache , And delete them . The second step : adopt conda clean -t Can be deleted conda Preserved tar package .
conda clean -p // Delete useless bags
conda clean -t // Delete tar package
conda clean -y --all // Remove all installation packages and cacheReference resources :https://blog.csdn.net/menc15/article/details/71477949
Copy / rename / Delete env Environmental Science
Conda There is no function to rename the environment , To achieve this basic need , Only through stupid clone - Delete The process of . Remember not to be direct mv Move the environment folder to rename , Can lead to a series of unimaginable mistakes !
// clone oldname The environment is newname Environmental Science
conda create --name newname --clone oldname
// Delete the old environment completely
conda remove --name oldname --all Be careful : Must be in base Carry out the above operations under the environment , Otherwise, there will be all kinds of inexplicable problems .
conda Auto on / Turn off activation
Reference resources :https://www.cnblogs.com/clemente/p/11231539.html
conda activate # Default activation base Environmental Science
conda activate xxx # Activate xxx Environmental Science
conda deactivate # Shut down the current environment
conda config --set auto_activate_base false # Turn off auto activation
conda config --set auto_activate_base true # Turn off auto activation Conda Install local package
Sometimes conda or pip Source download speed is too slow ,install a During the process, the connection will be interrupted, resulting in incomplete download of compressed package , here , We can use the browser and other tools to download the specified package and then conda or pip For local installation
#pip Install local package
pip install ~/Downloads/a.whl
#conda Install local package
conda install --use-local ~/Downloads/a.tar.bz2solve conda/pip install Slow download speed
conda Data source management
# Show current conda What are the data sources of
conda config --show channels
# Add data sources : for example , Add Tsinghua anaconda Mirror image :
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 --set show_channel_urls yes
# Delete data source
conda config --remove channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/Make a note of
# My ~/.condarc
auto_activate_base: false
channels:
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/menpo/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
show_channel_urls: truepip Data source management
# Show current pip What are the data sources of
pip config list
pip config list --[user|global] # List users | Global settings
pip config get global.index-url # Get this key Corresponding value Such as :https://mirrors.aliyun.com/pypi/simple/
# add to
pip config set key value
# Add data sources : for example , add to USTC The source of CUHK :
pip config set global.index-url https://mirrors.ustc.edu.cn/pypi/web/simple
# Add global use of this data source
pip config set global.trusted-host https://mirrors.ustc.edu.cn/pypi/web/simple
# Delete
pip config unset key
# for example
conda config --remove channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
# Search for
pip search flask # Search element flask Installation package
# upgrade pip
pip install pip -UMake a note of pip Domestic source
Alibaba cloud http://mirrors.aliyun.com/pypi/simple/
University of science and technology of China https://pypi.mirrors.ustc.edu.cn/simple/
douban (douban) http://pypi.douban.com/simple/
Tsinghua University https://pypi.tuna.tsinghua.edu.cn/simple/
University of science and technology of China http://pypi.mirrors.ustc.edu.cn/simple/pip Installation package management
pip list # List currently cached packages
pip purge # Clear cache
pip remove # Delete the corresponding cache
pip help # help
pip install xxx # install xxx package
pip uninstall xxx # Delete xxx package
pip show xxx # Show the specified installed xxx package
pip check xxx # Check xxx Whether the package dependency is appropriate pip and conda Batch export 、 Installation of components (requirements.txt)
Common software installation
Reference resources :conda Common software installation in environment
problem
1:failed ERROR conda.core.link:_execute(502):
conda install The following error message appears when the software :
Preparing transaction: done
Verifying transaction: done
Executing transaction:
failed ERROR conda.core.link:_execute(502):resolvent : Often, the permission is not enough , Need to run as Administrator Anaconda prompt Installation
2.anaconda or conda Not an internal command
resolvent :https://zhuanlan.zhihu.com/p/32446675
Add the environment variables in the above figure
jupyter notebook Default working directory settings Reference resources :https://blog.csdn.net/liwei1205/article/details/78818568
1) stay Anaconda Prompt Enter the following command in the terminal , View your notebook Where is the configuration file :
jupyter notebook --generate-config
# Will generate files C:\Users\ user \.jupyter\jupyter_notebook_config.py2) open jupyter_notebook_config.py File by searching for keywords :c.NotebookApp.notebook_dir, Revised as follows
c.NotebookApp.notebook_dir = 'E:\\tf_models' // Modify to custom folder 3) And then restart notebook The server will do
** notes :** Other methods direct commands to the specified directory ,Anaconda Prompt The terminal is in the middle of transmission :jupyter notebook Directory address
3.conda Create an environment with errors :NotWritableError: The current user does not have write permissions to a required path.
The main reason for the problem : The user did not .conda Folder read and write permissions , The reason is due to the installation conda Administrator privileges are used .
sudo chown -R xxx:xxx .conda #xxx For your user name / Group 4.conda Create an environment with errors :Collecting package metadata (current_repodata.json): failed ProxyError: Conda cannot proceed due to an error in your proxy configuration.
reason : Mainly conda install xxx when , Use Ctrl+C Forcibly interrupt the installation xxx Software , And then modified PC Network connection mode ( Proxy connection is changed to direct connection )
env | grep -i "_PROXY"
# You can see the original proxy connection method
# resolvent :
# Close the current terminal , Reopen the new terminal , Then the problem was solved Publisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/127187.html Link to the original text :https://javaforall.cn
边栏推荐
- Leetcode 1184. distance between bus stops
- SSTI 模板注入漏洞总结之[BJDCTF2020]Cookie is so stable
- Plus SBOM: assembly line BOM pbom
- 【6】 Map box settings
- Create directories and subdirectories circularly
- clickhouse笔记03-- Grafana 接入ClickHouse
- SSTI template injection vulnerability summary [bjdctf2020]cookie is so stable
- State mode
- 基于Caffe ResNet-50网络实现图片分类(仅推理)的实验复现
- 零基础学习CANoe Panel(14)——二极管( LED Control )和液晶屏(LCD Control)
猜你喜欢
![[advanced C language] dynamic memory management](/img/b7/6586b35500eb8f39a3ea8c125fb572.png)
[advanced C language] dynamic memory management

【C语言进阶】动态内存管理

JS convert pseudo array to array

clickhouse笔记03-- Grafana 接入ClickHouse

Leetcode 1184. distance between bus stops

想要做好软件测试,可以先了解AST、SCA和渗透测试
![[ROS advanced chapter] Lecture 9 programming optimization of URDF and use of xacro](/img/a2/9b676d0f1b33cc7d413cee6c52d76d.png)
[ROS advanced chapter] Lecture 9 programming optimization of URDF and use of xacro

Introduction to the scratch crawler framework

Detailed explanation of flex box

【Flutter -- 实例】案例一:基础组件 & 布局组件综合实例
随机推荐
What does the software testing process include? What are the test methods?
基于Caffe ResNet-50网络实现图片分类(仅推理)的实验复现
艰辛的旅程
阿里云技术专家秦隆:可靠性保障必备——云上如何进行混沌工程?
flinkcdc可以一起导mongodb数据库中的多张表吗?
公安部:国际社会普遍认为中国是世界上最安全的国家之一
Pytorch project practice - fashionmnist fashion classification
【Flutter -- 布局】层叠布局(Stack和Positioned)
Implementation of recommendation system collaborative filtering in spark
[fluent -- example] case 1: comprehensive example of basic components and layout components
【AI4Code】《InferCode: Self-Supervised Learning of Code Representations by Predicting Subtrees》ICSE‘21
【6】 Map box settings
Build a series of vision transformer practices, and finally meet, Timm library!
【11】 Production and adjustment of vector and grid data Legends
485 communication (detailed explanation)
Excuse me, using data integration to import data from PostgreSQL to MySQL database, emoj appears in some data fields
Synergetic process
The first scratch crawler
A hard journey
A method to prevent SYN flooding attacks -- syn cookies