展开
拓展 关闭
订阅号推广码
GitHub
视频
公告栏 关闭

安装Miniconda

  • 登录centos
# 下载
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
# 安装
bash Miniconda3-latest-Linux-x86_64.sh
# 一路enter
# 同意
Do you accept the license terms? [yes|no]
>>> yes
Miniconda3 will now be installed into this location:
/root/miniconda3
- Press ENTER to confirm the location
- Press CTRL-C to abort the installation
- Or specify a different location below
# 指定安装路径
[/root/miniconda3] >>> /opt/onlineedu/miniconda3
# 不取消此操作
You can undo this by running `conda init --reverse $SHELL`? [yes|no]
[no] >>> no
# 配置
vim /etc/profile
# 配置如下
export CONDA_HOME=/opt/onlineedu/miniconda3
export PATH=$PATH:$CONDA_HOME/bin
# 刷新
source /etc/profile
# 编辑
vim ~/.bashrc
# 添加如下
export PATH="/opt/onlineedu/miniconda3/bin:$PATH"
# 加载环境变量配置文件
source ~/.bashrc
# 验证
conda --version
# 禁止激活默认base环境
conda config --set auto_activate_base false
  • 完整步骤
查看详情
[root@slave1 ~]# wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
--2024-01-12 03:28:26-- https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
正在解析主机 repo.anaconda.com (repo.anaconda.com)... 104.16.130.3, 104.16.131.3, 2606:4700::6810:8203, ...
正在连接 repo.anaconda.com (repo.anaconda.com)|104.16.130.3|:443... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:141613749 (135M) [text/x-sh]
正在保存至: “Miniconda3-latest-Linux-x86_64.sh”
100%[==================================================================================================================================================================>] 141,613,749 11.0MB/s 用时 15s
2024-01-12 03:28:41 (9.29 MB/s) - 已保存 “Miniconda3-latest-Linux-x86_64.sh” [141613749/141613749])
[root@slave1 home]# bash Miniconda3-latest-Linux-x86_64.sh
Welcome to Miniconda3 py311_23.11.0-2
In order to continue the installation process, please review the license
agreement.
Please, press ENTER to continue
>>>
======================================
End User License Agreement - Miniconda
======================================
Copyright 2015-2023, Anaconda, Inc.
All rights reserved under the 3-clause BSD License:
This End User License Agreement (the "Agreement") is a legal agreement between you and Anaconda, Inc. ("Anaconda") and governs your use of Miniconda.
Subject to the terms of this Agreement, Anaconda hereby grants you a non-exclusive, non-transferable license to:
* Install and use the Miniconda,
* Modify and create derivative works of sample source code delivered in Miniconda subject to the Terms of Service for the Repository (as defined hereinafter) available at https://www.anaconda.com/terms-
of-service, and
* Redistribute code files in source (if provided to you by Anaconda as source) and binary forms, with or without modification subject to the requirements set forth below.
Anaconda may, at its option, make available patches, workarounds or other updates to Miniconda. Unless the updates are provided with their separate governing terms, they are deemed part of Miniconda licen
sed to you as provided in this Agreement. This Agreement does not entitle you to any support for Miniconda.
Anaconda reserves all rights not expressly granted to you in this Agreement.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distributio
n.
* Neither the name of Anaconda nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
You acknowledge that, as between you and Anaconda, Anaconda owns all right, title, and interest, including all intellectual property rights, in and to Miniconda and, with respect to third-party products d
istributed with or through Miniconda, the applicable third-party licensors own all right, title and interest, including all intellectual property rights, in and to such products. If you send or transmit a
ny communications or materials to Anaconda suggesting or recommending changes to the software or documentation, including without limitation, new features or functionality relating thereto, or any comment
s, questions, suggestions or the like ("Feedback"), Anaconda is free to use such Feedback. You hereby assign to Anaconda all right, title, and interest in, and Anaconda is free to use, without any attribu
tion or compensation to any party, any ideas, know-how, concepts, techniques or other intellectual property rights contained in the Feedback, for any purpose whatsoever, although Anaconda is not required
to use any Feedback.
DISCLAIMER
==========
THIS SOFTWARE IS PROVIDED BY ANACONDA AND ITS CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICU
LAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANACONDA BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUT
E GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWI
SE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
TO THE MAXIMUM EXTENT PERMITTED BY LAW, ANACONDA AND ITS AFFILIATES SHALL NOT BE LIABLE FOR ANY SPECIAL, INCIDENTAL, PUNITIVE OR CONSEQUENTIAL DAMAGES, OR ANY LOST PROFITS, LOSS OF USE, LOSS OF DATA OR LO
SS OF GOODWILL, OR THE COSTS OF PROCURING SUBSTITUTE PRODUCTS, ARISING OUT OF OR IN CONNECTION WITH THIS AGREEMENT OR THE USE OR PERFORMANCE OF MINICONDA, WHETHER SUCH LIABILITY ARISES FROM ANY CLAIM BASE
D UPON BREACH OF CONTRACT, BREACH OF WARRANTY, TORT (INCLUDING NEGLIGENCE), PRODUCT LIABILITY OR ANY OTHER CAUSE OF ACTION OR THEORY OF LIABILITY. IN NO EVENT WILL THE TOTAL CUMULATIVE LIABILITY OF ANACON
DA AND ITS AFFILIATES UNDER OR ARISING OUT OF THIS AGREEMENT EXCEED 10.00 U.S. DOLLARS.
Miscellaneous
=============
If you want to terminate this Agreement, you may do so by discontinuing use of Miniconda. Anaconda may, at any time, terminate this Agreement and the license granted hereunder if you fail to comply with a
ny term of this Agreement. Upon any termination of this Agreement, you agree to promptly discontinue use of the Miniconda and destroy all copies in your possession or control. Upon any termination of this
Agreement all provisions survive except for the licenses granted to you.
This Agreement is governed by and construed in accordance with the internal laws of the State of Texas without giving effect to any choice or conflict of law provision or rule that would require or permit
the application of the laws of any jurisdiction other than those of the State of Texas. Any legal suit, action, or proceeding arising out of or related to this Agreement or the licenses granted hereunder
by you must be instituted exclusively in the federal courts of the United States or the courts of the State of Texas in each case located in Travis County, Texas, and you irrevocably submit to the jurisd
iction of such courts in any such suit, action, or proceeding.
Notice of Third Party Software Licenses
=======================================
Miniconda provides access to a repository (the "Repository") which contains software packages or tools licensed on an open source basis from third parties and binary packages of these third party tools. T
hese third party software packages or tools are provided on an "as is" basis and are subject to their respective license agreements as well as this Agreement and the Terms of Service for the Repository lo
cated at https://www.anaconda.com/terms-of-service; provided, however, no restriction contained in the Terms of Service shall be construed so as to limit Your ability to download the packages contained in
Miniconda provided you comply with the license for each such package. These licenses may be accessed from within the Miniconda software[1] or https://www.anaconda.com/legal. Information regarding which l
icense is applicable is available from within many of the third party software packages and tools and at https://repo.anaconda.com/pkgs/main/ and https://repo.anaconda.com/pkgs/r/. Anaconda reserves the r
ight, in its sole discretion, to change which third party tools are included in the Repository accessible through Miniconda.
Intel Math Kernel Library
-------------------------
Miniconda provides access to re-distributable, run-time, shared-library files from the Intel Math Kernel Library ("MKL binaries").
Copyright 2018 Intel Corporation. License available at https://software.intel.com/en-us/license/intel-simplified-software-license (the "MKL License").
You may use and redistribute the MKL binaries, without modification, provided the following conditions are met:
* Redistributions must reproduce the above copyright notice and the following terms of use in the MKL binaries and in the documentation and/or other materials provided with the distribution.
* Neither the name of Intel nor the names of its suppliers may be used to endorse or promote products derived from the MKL binaries without specific prior written permission.
* No reverse engineering, decompilation, or disassembly of the MKL binaries is permitted.
You are specifically authorized to use and redistribute the MKL binaries with your installation of Miniconda subject to the terms set forth in the MKL License. You are also authorized to redistribute the
MKL binaries with Miniconda or in the Anaconda package that contains the MKL binaries. If needed, instructions for removing the MKL binaries after installation of Miniconda are available at https://docs.a
naconda.com.
cuDNN Software
--------------
Miniconda also provides access to cuDNN software binaries ("cuDNN binaries") from NVIDIA Corporation. You are specifically authorized to use the cuDNN binaries with your installation of Miniconda subject
to your compliance with the license agreement located at https://docs.nvidia.com/deeplearning/sdk/cudnn-sla/index.html. You are also authorized to redistribute the cuDNN binaries with an Miniconda package
that contains the cuDNN binaries. You can add or remove the cuDNN binaries utilizing the install and uninstall features in Miniconda.
cuDNN binaries contain source code provided by NVIDIA Corporation.
Arm Performance Libraries
-------------------------
Arm Performance Libraries (Free Version): Anaconda provides access to software and related documentation from the Arm Performance Libraries ("Arm PL") provided by Arm Limited. By installing or otherwise a
ccessing the Arm PL, you acknowledge and agree that use and distribution of the Arm PL is subject to your compliance with the Arm PL end user license agreement located at: https://developer.arm.com/tools-
and-software/server-and-hpc/downloads/arm-performance-libraries/eula.
Export; Cryptography Notice
===========================
You must comply with all domestic and international export laws and regulations that apply to the software, which include restrictions on destinations, end users, and end use. Miniconda includes cryptogra
phic software. The country in which you currently reside may have restrictions on the import, possession, use, and/or re-export to another country, of encryption software. BEFORE using any encryption soft
ware, please check your country's laws, regulations and policies concerning the import, possession, or use, and re-export of encryption software, to see if this is permitted. See the Wassenaar Arrangement
http://www.wassenaar.org/ for more information.
Anaconda has self-classified this software as Export Commodity Control Number (ECCN) EAR99, which includes mass market information security software using or performing cryptographic functions with asymme
tric algorithms. No license is required for export of this software to non-embargoed countries.
The Intel Math Kernel Library contained in Miniconda is classified by Intel as ECCN 5D992.c with no license required for export to non-embargoed countries.
The following packages listed on https://www.anaconda.com/cryptography are included in the Repository accessible through Miniconda that relate to cryptography.
Last updated March 21, 2022
Do you accept the license terms? [yes|no]
>>> yes
Miniconda3 will now be installed into this location:
/root/miniconda3
- Press ENTER to confirm the location
- Press CTRL-C to abort the installation
- Or specify a different location below
[/root/miniconda3] >>> /opt/onlineedu/miniconda3
PREFIX=/opt/onlineedu/miniconda3
Unpacking payload ...
Extracting : python-3.11.5-h955ad1f_0.conda: 1%|█▋ | 1/73 [00:01<01:34, 1.31s/iExtracting : _libgcc_mutex-0.1-main.conda: 1%|█▋ | 1/73 [00:01<01:34, 1.31s/iExtracting : ca-certificates-2023.12.12-h06a4308_0.conda: 3%|███ | 2/73 [00:01<01:32, 1.31s/Extracting : ld_impl_linux-64-2.38-h1181459_1.conda: 4%|████▋ | 3/73 [00:01<01:31, 1.31Extracting : libstdcxx-ng-11.2.0-h1234567_1.conda: 5%|██████▍ | 4/73 [00:01<01:30, 1.Extracting : libstdcxx-ng-11.2.0-h1234567_1.conda: 7%|████████ | 5/73 [00:01<00:16, 4Extracting : pybind11-abi-4-hd3eb1b0_1.conda: 7%|████████▎ | 5/73 [00:01<00:16, Extracting : tzdata-2023c-h04d1e81_0.conda: 8%|██████████▏ | 6/73 [00:01<00:15,Extracting : tzdata-2023c-h04d1e81_0.conda: 10%|███████████▉ | 7/73 [00:01<00:11Extracting : libgomp-11.2.0-h1234567_1.conda: 10%|███████████▋ | 7/73 [00:01<00:11Extracting : _openmp_mutex-5.1-1_gnu.conda: 11%|█████████████▌ | 8/73 [00:01<00:Extracting : libgcc-ng-11.2.0-h1234567_1.conda: 12%|██████████████▊ | 9/73 [00:01<00Extracting : libgcc-ng-11.2.0-h1234567_1.conda: 14%|████████████████▎ | 10/73 [00:01<Extracting : bzip2-1.0.8-h7b6447c_0.conda: 14%|████████████████▉ | 10/73 [00:01<Extracting : c-ares-1.19.1-h5eee18b_0.conda: 15%|██████████████████▍ | 11/73 [00:0Extracting : fmt-9.1.0-hdb19cb5_0.conda: 16%|████████████████████▋ | 12/73 [00Extracting : icu-73.1-h6a678d5_0.conda: 18%|██████████████████████▌ | 13/73 [Extracting : icu-73.1-h6a678d5_0.conda: 19%|████████████████████████▎ | 14/73Extracting : libev-4.33-h7f8727e_1.conda: 19%|███████████████████████▉ | 14/73 Extracting : libffi-3.4.4-h6a678d5_0.conda: 21%|█████████████████████████▎ | 15/7Extracting : libffi-3.4.4-h6a678d5_0.conda: 22%|██████████████████████████▉ | 16/Extracting : libuuid-1.41.5-h5eee18b_0.conda: 22%|██████████████████████████▌ | 16/Extracting : lz4-c-1.9.4-h6a678d5_0.conda: 23%|████████████████████████████▉ | 1Extracting : ncurses-6.4-h6a678d5_0.conda: 25%|██████████████████████████████▌ |Extracting : ncurses-6.4-h6a678d5_0.conda: 26%|████████████████████████████████▎ Extracting : openssl-3.0.12-h7f8727e_0.conda: 26%|███████████████████████████████▍ Extracting : openssl-3.0.12-h7f8727e_0.conda: 27%|█████████████████████████████████▏ Extracting : reproc-14.2.4-h295c915_1.conda: 27%|█████████████████████████████████▍ Extracting : xz-5.4.5-h5eee18b_0.conda: 29%|████████████████████████████████████▌ Extracting : xz-5.4.5-h5eee18b_0.conda: 30%|██████████████████████████████████████▎ Extracting : yaml-cpp-0.8.0-h6a678d5_0.conda: 30%|████████████████████████████████████▍ Extracting : zlib-1.2.13-h5eee18b_0.conda: 32%|███████████████████████████████████████ Extracting : libedit-3.1.20230828-h5eee18b_0.conda: 33%|█████████████████████████████████████▊ Extracting : libedit-3.1.20230828-h5eee18b_0.conda: 34%|███████████████████████████████████████▍ Extracting : libnghttp2-1.57.0-h2d74bed_0.conda: 34%|████████████████████████████████████████▍ Extracting : libssh2-1.10.0-hdbd6064_2.conda: 36%|███████████████████████████████████████████ Extracting : libssh2-1.10.0-hdbd6064_2.conda: 37%|████████████████████████████████████████████▊ Extracting : libxml2-2.10.4-hf1b16e4_1.conda: 37%|████████████████████████████████████████████▊ Extracting : pcre2-10.42-hebb0a14_0.conda: 38%|███████████████████████████████████████████████▌ Extracting : pcre2-10.42-hebb0a14_0.conda: 40%|█████████████████████████████████████████████████▎ Extracting : readline-8.2-h5eee18b_0.conda: 40%|████████████████████████████████████████████████▊ Extracting : reproc-cpp-14.2.4-h295c915_1.conda: 41%|████████████████████████████████████████████████▍ Extracting : tk-8.6.12-h1ccaba5_0.conda: 42%|█████████████████████████████████████████████████████▌ Extracting : tk-8.6.12-h1ccaba5_0.conda: 44%|███████████████████████████████████████████████████████▏ Extracting : zstd-1.5.5-hc292b87_0.conda: 44%|██████████████████████████████████████████████████████▊ Extracting : krb5-1.20.1-h143b758_1.conda: 45%|████████████████████████████████████████████████████████ Extracting : krb5-1.20.1-h143b758_1.conda: 47%|█████████████████████████████████████████████████████████▊ Extracting : libarchive-3.6.2-h6ac8c49_2.conda: 47%|███████████████████████████████████████████████████████▍ Extracting : libsolv-0.7.24-he621ea3_0.conda: 48%|██████████████████████████████████████████████████████████ Extracting : sqlite-3.41.2-h5eee18b_0.conda: 49%|████████████████████████████████████████████████████████████▏ Extracting : sqlite-3.41.2-h5eee18b_0.conda: 51%|█████████████████████████████████████████████████████████████▊ Extracting : libcurl-8.4.0-h251f7ec_1.conda: 51%|█████████████████████████████████████████████████████████████▊ Extracting : libmamba-1.5.3-haf1ee3a_0.conda: 52%|██████████████████████████████████████████████████████████████▉ Extracting : libmamba-1.5.3-haf1ee3a_0.conda: 53%|████████████████████████████████████████████████████████████████▋ Extracting : menuinst-2.0.1-py311h06a4308_1.conda: 53%|█████████████████████████████████████████████████████████████▉ Extracting : archspec-0.2.1-pyhd3eb1b0_0.conda: 55%|█████████████████████████████████████████████████████████████████▏ Extracting : boltons-23.0.0-py311h06a4308_0.conda: 56%|█████████████████████████████████████████████████████████████████▏ Extracting : boltons-23.0.0-py311h06a4308_0.conda: 58%|██████████████████████████████████████████████████████████████████▋ Extracting : brotli-python-1.0.9-py311h6a678d5_7.conda: 58%|███████████████████████████████████████████████████████████████▊ Extracting : certifi-2023.11.17-py311h06a4308_0.conda: 59%|█████████████████████████████████████████████████████████████████▉ Extracting : charset-normalizer-2.0.4-pyhd3eb1b0_0.conda: 60%|█████████████████████████████████████████████████████████████████▋ Extracting : distro-1.8.0-py311h06a4308_0.conda: 62%|████████████████████████████████████████████████████████████████████████▋ Extracting : idna-3.4-py311h06a4308_0.conda: 63%|████████████████████████████████████████████████████████████████████████████▉Extracting : jsonpointer-2.1-pyhd3eb1b0_0.conda: 64%|███████████████████████████████████████████████████████████████████████████Extracting : libmambapy-1.5.3-py311h2dafd23_0.conda: 66%|█████████████████████████████████████████████████████████████████████████Extracting : libmambapy-1.5.3-py311h2dafd23_0.conda: 67%|█████████████████████████████████████████████████████████████████████████Extracting : packaging-23.1-py311h06a4308_0.conda: 67%|██████████████████████████████████████████████████████████████████████████Extracting : platformdirs-3.10.0-py311h06a4308_0.conda: 68%|███████████████████████████████████████████████████████████████████████Extracting : pluggy-1.0.0-py311h06a4308_1.conda: 70%|███████████████████████████████████████████████████████████████████████████Extracting : pycosat-0.6.6-py311h5eee18b_0.conda: 71%|██████████████████████████████████████████████████████████████████████████Extracting : pycparser-2.21-pyhd3eb1b0_0.conda: 73%|███████████████████████████████████████████████████████████████████████████Extracting : pycparser-2.21-pyhd3eb1b0_0.conda: 74%|███████████████████████████████████████████████████████████████████████████Extracting : pysocks-1.7.1-py311h06a4308_0.conda: 74%|██████████████████████████████████████████████████████████████████████████Extracting : ruamel.yaml-0.17.21-py311h5eee18b_0.conda: 75%|███████████████████████████████████████████████████████████████████████Extracting : setuptools-68.2.2-py311h06a4308_0.conda: 77%|████████████████████████████████████████████████████████████████████████Extracting : tqdm-4.65.0-py311h92b7b1e_0.conda: 78%|███████████████████████████████████████████████████████████████████████████Extracting : tqdm-4.65.0-py311h92b7b1e_0.conda: 79%|███████████████████████████████████████████████████████████████████████████Extracting : truststore-0.8.0-py311h06a4308_0.conda: 79%|█████████████████████████████████████████████████████████████████████████Extracting : wheel-0.41.2-py311h06a4308_0.conda: 81%|███████████████████████████████████████████████████████████████████████████Extracting : cffi-1.16.0-py311h5eee18b_0.conda: 82%|███████████████████████████████████████████████████████████████████████████Extracting : jsonpatch-1.32-pyhd3eb1b0_0.conda: 84%|███████████████████████████████████████████████████████████████████████████Extracting : jsonpatch-1.32-pyhd3eb1b0_0.conda: 85%|███████████████████████████████████████████████████████████████████████████Extracting : pip-23.3.1-py311h06a4308_0.conda: 85%|████████████████████████████████████████████████████████████████████████████Extracting : cryptography-41.0.7-py311hdda0065_0.conda: 86%|███████████████████████████████████████████████████████████████████████Extracting : zstandard-0.19.0-py311h5eee18b_0.conda: 88%|█████████████████████████████████████████████████████████████████████████Extracting : zstandard-0.19.0-py311h5eee18b_0.conda: 89%|█████████████████████████████████████████████████████████████████████████Extracting : conda-content-trust-0.2.0-py311h06a4308_0.conda: 89%|████████████████████████████████████████████████████████████████████Extracting : conda-package-streaming-0.9.0-py311h06a4308_0.conda: 90%|██████████████████████████████████████████████████████████████████Extracting : pyopenssl-23.2.0-py311h06a4308_0.conda: 92%|█████████████████████████████████████████████████████████████████████████Extracting : conda-package-handling-2.2.0-py311h06a4308_0.conda: 93%|███████████████████████████████████████████████████████████████████Extracting : urllib3-1.26.18-py311h06a4308_0.conda: 95%|█████████████████████████████████████████████████████████████████████████Extracting : urllib3-1.26.18-py311h06a4308_0.conda: 96%|█████████████████████████████████████████████████████████████████████████Extracting : requests-2.31.0-py311h06a4308_0.conda: 96%|█████████████████████████████████████████████████████████████████████████Extracting : conda-23.11.0-py311h06a4308_0.conda: 97%|██████████████████████████████████████████████████████████████████████████Extracting : conda-libmamba-solver-23.12.0-pyhd3eb1b0_1.conda: 99%|████████████████████████████████████████████████████████████████████Extracting : conda-libmamba-solver-23.12.0-pyhd3eb1b0_1.conda: 100%|████████████████████████████████████████████████████████████████████
Installing base environment...
Downloading and Extracting Packages:
Downloading and Extracting Packages:
Preparing transaction: done
Executing transaction: done
installation finished.
Do you wish to update your shell profile to automatically initialize conda?
This will activate conda on startup and change the command prompt when activated.
If you'd prefer that conda's base environment not be activated on startup,
run the following command when conda is activated:
conda config --set auto_activate_base false
You can undo this by running `conda init --reverse $SHELL`? [yes|no]
[no] >>> no
You have chosen to not have conda modify your shell scripts at all.
To activate conda's base environment in your current shell session:
eval "$(/opt/onlineedu/miniconda3/bin/conda shell.YOUR_SHELL_NAME hook)"
To install conda's shell functions for easier access, first activate, then:
conda init
Thank you for installing Miniconda3!
  • Superset 是由 Python 语言编写的 Web 应用,要求 Python3.7 以上的环境,为了避免 Python 版本冲突,我们需要为 Superset 单独创建一个 Python环境。这里我们使用 Miniconda 创建一个 Pvthon3.8 的虚拟环境
# 删除清华镜像
conda config --remove-key channels
# 查看,只保留默认
conda config --show channels
# 查看python版本
python -V
python3
# 查看所有环境
conda info --envs
# 创建虚拟环境superset并指定python版本,如果不指定则使用默认
conda create --name superset python=3.8
# 激活虚拟环境
source activate superset
# 激活方式2
conda activate superset
# 退出当前环境
conda deactivate
# 删除虚拟环境
conda remove -n superset --all
  • 完整步骤
查看详情
[root@slave1 home]# python -V
Python 3.11.5
[root@slave1 home]# python3
Python 3.11.5 (main, Sep 11 2023, 13:54:46) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
[root@slave1 home]# conda info --envs
# conda environments:
#
base /opt/onlineedu/miniconda3
[root@slave1 home]# conda create --name superset python=3.8
Channels:
- defaults
Platform: linux-64
Collecting package metadata (repodata.json): done
Solving environment: done
## Package Plan ##
environment location: /opt/onlineedu/miniconda3/envs/superset
added / updated specs:
- python=3.8
The following packages will be downloaded:
package | build
---------------------------|-----------------
pip-23.3.1 | py38h06a4308_0 2.6 MB
python-3.8.18 | h955ad1f_0 25.3 MB
setuptools-68.2.2 | py38h06a4308_0 948 KB
wheel-0.41.2 | py38h06a4308_0 108 KB
------------------------------------------------------------
Total: 28.9 MB
The following NEW packages will be INSTALLED:
_libgcc_mutex pkgs/main/linux-64::_libgcc_mutex-0.1-main
_openmp_mutex pkgs/main/linux-64::_openmp_mutex-5.1-1_gnu
ca-certificates pkgs/main/linux-64::ca-certificates-2023.12.12-h06a4308_0
ld_impl_linux-64 pkgs/main/linux-64::ld_impl_linux-64-2.38-h1181459_1
libffi pkgs/main/linux-64::libffi-3.4.4-h6a678d5_0
libgcc-ng pkgs/main/linux-64::libgcc-ng-11.2.0-h1234567_1
libgomp pkgs/main/linux-64::libgomp-11.2.0-h1234567_1
libstdcxx-ng pkgs/main/linux-64::libstdcxx-ng-11.2.0-h1234567_1
ncurses pkgs/main/linux-64::ncurses-6.4-h6a678d5_0
openssl pkgs/main/linux-64::openssl-3.0.12-h7f8727e_0
pip pkgs/main/linux-64::pip-23.3.1-py38h06a4308_0
python pkgs/main/linux-64::python-3.8.18-h955ad1f_0
readline pkgs/main/linux-64::readline-8.2-h5eee18b_0
setuptools pkgs/main/linux-64::setuptools-68.2.2-py38h06a4308_0
sqlite pkgs/main/linux-64::sqlite-3.41.2-h5eee18b_0
tk pkgs/main/linux-64::tk-8.6.12-h1ccaba5_0
wheel pkgs/main/linux-64::wheel-0.41.2-py38h06a4308_0
xz pkgs/main/linux-64::xz-5.4.5-h5eee18b_0
zlib pkgs/main/linux-64::zlib-1.2.13-h5eee18b_0
Proceed ([y]/n)? y
Downloading and Extracting Packages:
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
# $ conda activate superset
#
# To deactivate an active environment, use
#
# $ conda deactivate
[root@slave1 home]# source activate superset
(superset) [root@slave1 home]# python -V
Python 3.8.18
posted @   DogLeftover  阅读(959)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
· 字符编码:从基础到乱码解决
· 提示词工程——AI应用必不可少的技术
点击右上角即可分享
微信分享提示