当前位置:网站首页>Installation and use of Anaconda
Installation and use of Anaconda
2022-06-11 13:46:00 【Not late not late】
1. download
- Tsinghua mirror :https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/
- official :https://www.anaconda.com/download/
2. install
With what I installed Anaconda3-5.3.0-Linux-x86_64.sh As an example :
sh Anaconda3-5.3.0-Linux-x86_64.sh
Full use yes + enter , By default, it will be installed in home Under the table of contents .
- Add environment variables
# That is, the installation path
export PATH="/home/ user name /anaconda3/bin:$PATH"
bring .bashrc Added path takes effect
source ~/.bashrc
- see python The path of
which python
- Check whether the installation is successful
# Query the installed version
conda -V
3. Set up domestic image
# add to Anaconda Of TUNA Mirror image
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
# TUNA Of help The image address is quoted in , Need to get rid of it.
# Set the channel address when searching
conda config --set show_channel_urls yes
After executing the above order , Will generate ~/.condarc(Linux/Mac) or C:\Users\USER_NAME.condarc file , Record our understanding of conda Configuration of , Create directly and manually 、 Editing the file has the same effect .
4. Use
(1) install python Environment and use
# Create a file called python36 Environment , Appoint Python The version is 3.6( Don't worry about it 3.6.x,conda Will automatically search for 3.4.x The latest version of )
conda create --name python34 python=3.4
# After installed , Use activate Activate an environment
activate python36 # for Windows
source activate python36 # for Linux & Mac
# After activation , Will find terminal There's a lot of input python36 The words...
# here , Input again
python --version
# If you want to return to the default python Environmental Science , function
deactivate python36 # for Windows
source deactivate python36 # for Linux & Mac
# Delete an existing environment
conda remove --name python36 --all
# perhaps
conda remove -n python36 --all
# Delete a package in the virtual environment
conda remove -n python36 scipy
Users install different python The environment will be placed in the directory ~/anaconda/envs Next , You can run conda info -e View the installed environment , The currently active environment will be displayed with an asterisk or parentheses .
(2) Use conda Install the normal package
- Installation of ordinary package
Conda Package management and pip similar . for example , If you need to install scipy:
# install scipy
conda install scipy
# View the installed packages
conda list
- Install the specified version
Search version first
conda search tensorflow
Install the specified version and build:
conda install tensorflow=1.12.0=mkl_py36h4f00353_0
(3)conda Some common operations of
- View the current environment
# 1. Method 1 :
conda info -e
#2. Method 2 :
conda info --envs
# 3. Method 3 :
conda env list
- View the installation package of the environment
# View the installed packages in the current environment
conda list
# View installed packages for a specified environment
conda list -n python36
- lookup package Information
conda search numpy
- install package
conda install -n python36 numpy
# If not -n Specify the environment name , Is installed in the currently active environment
- to update package
conda update -n python36 numpy
- Delete package
conda remove -n python36 numpy
- to update conda, keep conda newest
conda update conda
- to update anaconda
conda update anaconda
- to update python
Suppose the current environment is python 3.6, conda Will python Upgrade to 3.6.x The latest version of the series
conda update python
If you create a new python Environmental Science , such as 3.6, function conda create -n python36 python=3.6 after ,conda Install only python 3.6 Related mandatory items , Such as python, pip etc. , If you want the environment to be like the default environment , install anaconda Collection package , It only needs :
# Install in the current environment anaconda Bag collection
conda install anaconda
# Combined with the command to create the environment , The above operations can be combined into
conda create -n python36 python=3.6 anaconda
# Or you don't have to install it all , Install your own... As needed package that will do
5. Environment moves to another machine
conda list -e > requirement.txt
conda create -n python36 --file requirement.txt
边栏推荐
- SAP Spartacus 中的 checkout(结帐) 设计
- Explain in detail the differences between real participation formal parameters in C language
- No delay / no delay live video instance effect cases
- [backtrader source code analysis 46] cerebro Py code comments (boring, one of the core backtrader codes, recommended for reading, comments for reference only)
- Will Apple build a search engine?
- SAP Spartacus checkout 流程使用 url 粘贴直接跳转到 delivery mode不能打开页面的原因
- RS485(Modbus RTU)工业RFID读写器CK-FR03-A01与PLC三菱FX5U的通讯操作说明
- 看不懂Kotlin源码?从Contracts 函数说起~
- From real-time computing to streaming data warehouse, where will Flink go next?
- tf.data(二) —— 并行化 tf.data.Dataset 生成器
猜你喜欢

【信号去噪】基于稀疏性 (BEADS) 实现色谱基线估计和去噪附matlab代码和论文

Microsoft exposes another "scandal": watching VR porn in the office, "the father of hololens" is about to leave!

Ecplise cannot connect to SQL Server

No delay / no delay live video instance effect cases

Why does each running Department display that the database already exists, delete the database, and then succeed? Each running department must delete the database, and re run the whole successfully

Business practice of volcano engine cloud database VEDB in bytes

The global mobile phone market is declining, and even apple does not expect too much of the iphone14

Unsealing easy QF PDA helps enterprises improve ERP management

全球手机市场衰退,连苹果也对iPhone14不抱过高期待

Variable parameter expression
随机推荐
Business practice of volcano engine cloud database VEDB in bytes
Ali talked about the use of strategic mode in the project
Can't understand kotlin source code? Starting with the contracts function~
Live share experience
在启牛开的证券账户安全吗?如何申请低佣金的股票账户?
[201] PHP exception handling - try catch finally exception handling in PHP
程序员到了35岁之后的一些转型思考
Energy storage operation and configuration analysis of high proportion wind power system (realized by Matlab)
Optimal dispatching (thermal power, wind and energy storage) (realized by Matlab)
How to quickly make the title and ending with one click?
create_engine mysql connector加密方式报错
解决循环依赖BUG。Relying upon circular references is discouraged and they are prohibited by default.
三级分类展示
Work summary: it took a long time to write SQL because of Cartesian product problem (Cartesian product summary attached)
On the continuing Life of Distributed Locks - - Distributed Locks Based on redis
cadence SPB17.4 - allegro - allegro_ free_ viewer
Terrain + ansible implements infrastructure and configuration management
Container -- reverse content -- use of explosion, splicing, and inversion functions
Nomad application scheduling scheme 08 of hashicopy (detection job)
Is the brokerage account given by qiniu business school safe? Do you charge for opening an account