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

centos7安装使用Anaconda3

  • anaconda3与python对应版本
点击查看详情
anaconda3版本 基础python版本
Anaconda3-2024.02-1 Python 3.11.7
Anaconda3-2023.09-0 Python 3.11.5
Anaconda3-2023.07-2 Python 3.11.4
Anaconda3-2023.07-1 Python 3.11.3
Anaconda3-2023.07-0 Python 3.11.3
Anaconda3-2023.03-1 Python 3.10.9
Anaconda3-2023.03-0 Python 3.10.9
Anaconda3-2022.10 Python 3.9.13
Anaconda3-2022.05 Python 3.9.12
Anaconda3-2021.11 Python 3.9.7
Anaconda3-2021.05 Python 3.8.8
Anaconda3-2021.04 Python 3.8.8
Anaconda3-2020.11 Python 3.8.5
Anaconda3-2020.07 Python 3.8.3
Anaconda3-2020.02 Python 3.7.6
Anaconda3-2019.07 Python 3.7.3
# 进入home文件夹
cd /home
# 创建文件夹
mkdir software
# 使用sftp工具将Anaconda3-5.2.0-Linux-x86_64.sh上传到该文件夹
# 设置文件夹权限
chmod 755 Anaconda3-5.2.0-Linux-x86_64.sh
# 查看,显示绿色
ll
# 开始安装,一路enter
sh + [文件开头第1个字符] + Tab
查看详情
[root@master software]# sh Anaconda3-5.2.0-Linux-x86_64.sh
WARNING: bzip2 does not appear to be installed this may cause problems below
Welcome to Anaconda3 5.2.0
In order to continue the installation process, please review the license
agreement.
Please, press ENTER to continue
>>>
===================================
Anaconda End User License Agreement
===================================
Copyright 2015, Anaconda, Inc.
All rights reserved under the 3-clause BSD License:
Redistribution and use in source and binary forms, with or without modification, are permitted provided that t
he following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the fol
lowing 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 distribution.
* Neither the name of Anaconda, Inc. ("Anaconda, Inc.") nor the names of its contributors may be used to end
orse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANT
IES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PUR
POSE ARE DISCLAIMED. IN NO EVENT SHALL ANACONDA, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVIC
ES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WH
ETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Notice of Third Party Software Licenses
=======================================
Anaconda Distribution contains open source software packages from third parties. These are available on an "as
is" basis and subject to their individual license agreements. These licenses are available in Anaconda Distri
bution or at http://docs.anaconda.com/anaconda/pkg-docs. Any binary packages of these third party tools you ob
tain via Anaconda Distribution are subject to their individual licenses as well as the Anaconda license. Anaco
nda, Inc. reserves the right to change which third party tools are provided in Anaconda Distribution.
In particular, Anaconda Distribution contains re-distributable, run-time, shared-library files from the Intel(
TM) Math Kernel Library ("MKL binaries"). You are specifically authorized to use the MKL binaries with your in
stallation of Anaconda Distribution. You are also authorized to redistribute the MKL binaries with Anaconda Di
stribution or in the conda package that contains them. Use and redistribution of the MKL binaries are subject
to the licensing terms located at https://software.intel.com/en-us/license/intel-simplified-software-license.
If needed, instructions for removing the MKL binaries after installation of Anaconda Distribution are availabl
e at http://www.anaconda.com.
Anaconda Distribution also contains cuDNN software binaries from NVIDIA Corporation ("cuDNN binaries"). You ar
e specifically authorized to use the cuDNN binaries with your installation of Anaconda Distribution. You are a
lso authorized to redistribute the cuDNN binaries with an Anaconda Distribution package that contains them. If
needed, instructions for removing the cuDNN binaries after installation of Anaconda Distribution are availabl
e at http://www.anaconda.com.
Anaconda Distribution also contains Visual Studio Code software binaries from Microsoft Corporation ("VS Code"
). You are specifically authorized to use VS Code with your installation of Anaconda Distribution. Use of VS C
ode is subject to the licensing terms located at https://code.visualstudio.com/License.
Cryptography Notice
===================
This distribution includes cryptographic software. The country in which you currently reside may have restrict
ions on the import, possession, use, and/or re-export to another country, of encryption software. BEFORE using
any encryption software, please check your country's laws, regulations and policies concerning the import, po
ssession, or use, and re-export of encryption software, to see if this is permitted. See the Wassenaar Arrange
ment http://www.wassenaar.org/ for more information.
Anaconda, Inc. has self-classified this software as Export Commodity Control Number (ECCN) 5D992b, which inclu
des mass market information security software using or performing cryptographic functions with asymmetric algo
rithms. No license is required for export of this software to non-embargoed countries. In addition, the Intel(
TM) Math Kernel Library contained in Anaconda, Inc.'s software is classified by Intel(TM) as ECCN 5D992b with
no license required for export to non-embargoed countries and Microsoft's Visual Studio Code software is class
ified by Microsoft as ECCN 5D992.c with no license required for export to non-embargoed countries.
The following packages are included in this distribution that relate to cryptography:
openssl
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Op
en Source toolkit implementing the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols as
well as a full-strength general purpose cryptography library.
pycrypto
A collection of both secure hash functions (such as SHA256 and RIPEMD160), and various encryption algorith
ms (AES, DES, RSA, ElGamal, etc.).
pyopenssl
A thin Python wrapper around (a subset of) the OpenSSL library.
kerberos (krb5, non-Windows platforms)
A network authentication protocol designed to provide strong authentication for client/server applications
by using secret-key cryptography.
cryptography
A Python library which exposes cryptographic recipes and primitives.
Do you accept the license terms? [yes|no]
[no] >>> yes
Anaconda3 will now be installed into this location:
/root/anaconda3
- Press ENTER to confirm the location
- Press CTRL-C to abort the installation
- Or specify a different location below
[/root/anaconda3] >>> # 指定安装路径,如果不指定,默认如下
PREFIX=/root/anaconda3
Anaconda3-5.2.0-Linux-x86_64.sh: line 350: bunzip2: command not found # 报错:bunzip2依赖错误
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
  • 解决错误,使用yum命令不能安装
[root@master anaconda3]# yum install bunzip2
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
https://mirrors.aliyun.com/docker-ce/linux/centos/7/x86_64/stable/repodata/repomd.xml: [Errno 14] curl#60 - "Peer's Certificate has expired."
Trying other mirror.
It was impossible to connect to the CentOS servers.
This could mean a connectivity issue in your environment, such as the requirement to configure a proxy,
or a transparent proxy that tampers with TLS security, or an incorrect system clock.
You can try to solve this issue by using the instructions on https://wiki.centos.org/yum-errors
If above article doesn't help to resolve this issue please use https://bugs.centos.org/.
No package bunzip2 available.
Error: Nothing to do
  • 使用离线安装方式
# 下载rpm包,并上传到服务器
http://mirror.centos.org/centos/7/os/x86_64/Packages/bzip2-1.0.6-13.el7.x86_64.rpm
# 设置权限
chmod 755 bzip2-1.0.6-13.el7.x86_64.rpm
# 安装
[root@master software]# rpm -ivh bzip2-1.0.6-13.el7.x86_64.rpm
Preparing... ################################# [100%]
Updating / installing...
1:bzip2-1.0.6-13.el7 ################################# [100%]
# 删除安装目录,这里是默认的安装目录/root/anaconda3
[root@master software]# cd /root/anaconda3
[root@master anaconda3]# ls
LICENSE.txt pkgs preconda.tar.bz2
[root@master anaconda3]# cd ..
[root@master ~]# rm -rf /root/anaconda3
[root@master ~]# ls
  • 重新安装
查看详情
[root@master ~]# cd /home/software # 进入目录
[root@master software]# ls
Anaconda3-5.2.0-Linux-x86_64.sh
[root@master software]# sh Anaconda3-5.2.0-Linux-x86_64.sh # 执行安装程序
Welcome to Anaconda3 5.2.0
In order to continue the installation process, please review the license
agreement.
Please, press ENTER to continue
>>>
===================================
Anaconda End User License Agreement
===================================
Copyright 2015, Anaconda, Inc.
All rights reserved under the 3-clause BSD License:
Redistribution and use in source and binary forms, with or without modification, are permitted provided that t
he following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the fol
lowing 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 distribution.
* Neither the name of Anaconda, Inc. ("Anaconda, Inc.") nor the names of its contributors may be used to end
orse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANT
IES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PUR
POSE ARE DISCLAIMED. IN NO EVENT SHALL ANACONDA, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVIC
ES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WH
ETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Notice of Third Party Software Licenses
=======================================
Anaconda Distribution contains open source software packages from third parties. These are available on an "as
is" basis and subject to their individual license agreements. These licenses are available in Anaconda Distri
bution or at http://docs.anaconda.com/anaconda/pkg-docs. Any binary packages of these third party tools you ob
tain via Anaconda Distribution are subject to their individual licenses as well as the Anaconda license. Anaco
nda, Inc. reserves the right to change which third party tools are provided in Anaconda Distribution.
In particular, Anaconda Distribution contains re-distributable, run-time, shared-library files from the Intel(
TM) Math Kernel Library ("MKL binaries"). You are specifically authorized to use the MKL binaries with your in
stallation of Anaconda Distribution. You are also authorized to redistribute the MKL binaries with Anaconda Di
stribution or in the conda package that contains them. Use and redistribution of the MKL binaries are subject
to the licensing terms located at https://software.intel.com/en-us/license/intel-simplified-software-license.
If needed, instructions for removing the MKL binaries after installation of Anaconda Distribution are availabl
e at http://www.anaconda.com.
Anaconda Distribution also contains cuDNN software binaries from NVIDIA Corporation ("cuDNN binaries"). You ar
e specifically authorized to use the cuDNN binaries with your installation of Anaconda Distribution. You are a
lso authorized to redistribute the cuDNN binaries with an Anaconda Distribution package that contains them. If
needed, instructions for removing the cuDNN binaries after installation of Anaconda Distribution are availabl
e at http://www.anaconda.com.
Anaconda Distribution also contains Visual Studio Code software binaries from Microsoft Corporation ("VS Code"
). You are specifically authorized to use VS Code with your installation of Anaconda Distribution. Use of VS C
ode is subject to the licensing terms located at https://code.visualstudio.com/License.
Cryptography Notice
===================
This distribution includes cryptographic software. The country in which you currently reside may have restrict
ions on the import, possession, use, and/or re-export to another country, of encryption software. BEFORE using
any encryption software, please check your country's laws, regulations and policies concerning the import, po
ssession, or use, and re-export of encryption software, to see if this is permitted. See the Wassenaar Arrange
ment http://www.wassenaar.org/ for more information.
Anaconda, Inc. has self-classified this software as Export Commodity Control Number (ECCN) 5D992b, which inclu
des mass market information security software using or performing cryptographic functions with asymmetric algo
rithms. No license is required for export of this software to non-embargoed countries. In addition, the Intel(
TM) Math Kernel Library contained in Anaconda, Inc.'s software is classified by Intel(TM) as ECCN 5D992b with
no license required for export to non-embargoed countries and Microsoft's Visual Studio Code software is class
ified by Microsoft as ECCN 5D992.c with no license required for export to non-embargoed countries.
The following packages are included in this distribution that relate to cryptography:
openssl
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Op
en Source toolkit implementing the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols as
well as a full-strength general purpose cryptography library.
pycrypto
A collection of both secure hash functions (such as SHA256 and RIPEMD160), and various encryption algorith
ms (AES, DES, RSA, ElGamal, etc.).
pyopenssl
A thin Python wrapper around (a subset of) the OpenSSL library.
kerberos (krb5, non-Windows platforms)
A network authentication protocol designed to provide strong authentication for client/server applications
by using secret-key cryptography.
cryptography
A Python library which exposes cryptographic recipes and primitives.
Do you accept the license terms? [yes|no] # 您接受许可条款吗?
[no] >>> yes
Anaconda3 will now be installed into this location:
/root/anaconda3
- Press ENTER to confirm the location
- Press CTRL-C to abort the installation
- Or specify a different location below
[/root/anaconda3] >>> /home/software/anaconda3 # 指定路径
PREFIX=/home/software/anaconda3
installing: python-3.6.5-hc3d631a_2 ...
Python 3.6.5 :: Anaconda, Inc.
installing: blas-1.0-mkl ...
installing: ca-certificates-2018.03.07-0 ...
installing: conda-env-2.6.0-h36134e3_1 ...
installing: intel-openmp-2018.0.0-8 ...
installing: libgcc-ng-7.2.0-hdf63c60_3 ...
installing: libgfortran-ng-7.2.0-hdf63c60_3 ...
installing: libstdcxx-ng-7.2.0-hdf63c60_3 ...
installing: bzip2-1.0.6-h14c3975_5 ...
installing: expat-2.2.5-he0dffb1_0 ...
installing: gmp-6.1.2-h6c8ec71_1 ...
installing: graphite2-1.3.11-h16798f4_2 ...
installing: icu-58.2-h9c2bf20_1 ...
installing: jbig-2.1-hdba287a_0 ...
installing: jpeg-9b-h024ee3a_2 ...
installing: libffi-3.2.1-hd88cf55_4 ...
installing: libsodium-1.0.16-h1bed415_0 ...
installing: libtool-2.4.6-h544aabb_3 ...
installing: libxcb-1.13-h1bed415_1 ...
installing: lzo-2.10-h49e0be7_2 ...
installing: mkl-2018.0.2-1 ...
installing: ncurses-6.1-hf484d3e_0 ...
installing: openssl-1.0.2o-h20670df_0 ...
installing: patchelf-0.9-hf79760b_2 ...
installing: pcre-8.42-h439df22_0 ...
installing: pixman-0.34.0-hceecf20_3 ...
installing: snappy-1.1.7-hbae5bb6_3 ...
installing: tk-8.6.7-hc745277_3 ...
installing: unixodbc-2.3.6-h1bed415_0 ...
installing: xz-5.2.4-h14c3975_4 ...
installing: yaml-0.1.7-had09818_2 ...
installing: zlib-1.2.11-ha838bed_2 ...
installing: blosc-1.14.3-hdbcaa40_0 ...
installing: glib-2.56.1-h000015b_0 ...
installing: hdf5-1.10.2-hba1933b_1 ...
installing: libedit-3.1.20170329-h6b74fdf_2 ...
installing: libpng-1.6.34-hb9fc6fc_0 ...
installing: libssh2-1.8.0-h9cfc8f7_4 ...
installing: libtiff-4.0.9-he85c1e1_1 ...
installing: libxml2-2.9.8-h26e45fe_1 ...
installing: mpfr-3.1.5-h11a74b3_2 ...
installing: pandoc-1.19.2.1-hea2e7c5_1 ...
installing: readline-7.0-ha6073c6_4 ...
installing: zeromq-4.2.5-h439df22_0 ...
installing: dbus-1.13.2-h714fa37_1 ...
installing: freetype-2.8-hab7d2ae_1 ...
installing: gstreamer-1.14.0-hb453b48_1 ...
installing: libcurl-7.60.0-h1ad7b7a_0 ...
installing: libxslt-1.1.32-h1312cb7_0 ...
installing: mpc-1.0.3-hec55b23_5 ...
installing: sqlite-3.23.1-he433501_0 ...
installing: curl-7.60.0-h84994c4_0 ...
installing: fontconfig-2.12.6-h49f89f6_0 ...
installing: gst-plugins-base-1.14.0-hbbd80ab_1 ...
installing: alabaster-0.7.10-py36h306e16b_0 ...
installing: asn1crypto-0.24.0-py36_0 ...
installing: attrs-18.1.0-py36_0 ...
installing: backcall-0.1.0-py36_0 ...
installing: backports-1.0-py36hfa02d7e_1 ...
installing: beautifulsoup4-4.6.0-py36h49b8c8c_1 ...
installing: bitarray-0.8.1-py36h14c3975_1 ...
installing: boto-2.48.0-py36h6e4cd66_1 ...
installing: cairo-1.14.12-h7636065_2 ...
installing: certifi-2018.4.16-py36_0 ...
installing: chardet-3.0.4-py36h0f667ec_1 ...
installing: click-6.7-py36h5253387_0 ...
installing: cloudpickle-0.5.3-py36_0 ...
installing: colorama-0.3.9-py36h489cec4_0 ...
installing: contextlib2-0.5.5-py36h6c84a62_0 ...
installing: dask-core-0.17.5-py36_0 ...
installing: decorator-4.3.0-py36_0 ...
installing: docutils-0.14-py36hb0f60f5_0 ...
installing: entrypoints-0.2.3-py36h1aec115_2 ...
installing: et_xmlfile-1.0.1-py36hd6bccc3_0 ...
installing: fastcache-1.0.2-py36h14c3975_2 ...
installing: filelock-3.0.4-py36_0 ...
installing: glob2-0.6-py36he249c77_0 ...
installing: gmpy2-2.0.8-py36hc8893dd_2 ...
installing: greenlet-0.4.13-py36h14c3975_0 ...
installing: heapdict-1.0.0-py36_2 ...
installing: idna-2.6-py36h82fb2a8_1 ...
installing: imagesize-1.0.0-py36_0 ...
installing: ipython_genutils-0.2.0-py36hb52b0d5_0 ...
installing: itsdangerous-0.24-py36h93cc618_1 ...
installing: jdcal-1.4-py36_0 ...
installing: kiwisolver-1.0.1-py36h764f252_0 ...
installing: lazy-object-proxy-1.3.1-py36h10fcdad_0 ...
installing: llvmlite-0.23.1-py36hdbcaa40_0 ...
installing: locket-0.2.0-py36h787c0ad_1 ...
installing: lxml-4.2.1-py36h23eabaa_0 ...
installing: markupsafe-1.0-py36hd9260cd_1 ...
installing: mccabe-0.6.1-py36h5ad9710_1 ...
installing: mistune-0.8.3-py36h14c3975_1 ...
installing: mkl-service-1.1.2-py36h17a0993_4 ...
installing: mpmath-1.0.0-py36hfeacd6b_2 ...
installing: msgpack-python-0.5.6-py36h6bb024c_0 ...
installing: multipledispatch-0.5.0-py36_0 ...
installing: numpy-base-1.14.3-py36h9be14a7_1 ...
installing: olefile-0.45.1-py36_0 ...
installing: pandocfilters-1.4.2-py36ha6701b7_1 ...
installing: parso-0.2.0-py36_0 ...
installing: path.py-11.0.1-py36_0 ...
installing: pep8-1.7.1-py36_0 ...
installing: pickleshare-0.7.4-py36h63277f8_0 ...
installing: pkginfo-1.4.2-py36_1 ...
installing: pluggy-0.6.0-py36hb689045_0 ...
installing: ply-3.11-py36_0 ...
installing: psutil-5.4.5-py36h14c3975_0 ...
installing: ptyprocess-0.5.2-py36h69acd42_0 ...
installing: py-1.5.3-py36_0 ...
installing: pycodestyle-2.4.0-py36_0 ...
installing: pycosat-0.6.3-py36h0a5515d_0 ...
installing: pycparser-2.18-py36hf9f622e_1 ...
installing: pycrypto-2.6.1-py36h14c3975_8 ...
installing: pycurl-7.43.0.1-py36hb7f436b_0 ...
installing: pyodbc-4.0.23-py36hf484d3e_0 ...
installing: pyparsing-2.2.0-py36hee85983_1 ...
installing: pysocks-1.6.8-py36_0 ...
installing: pytz-2018.4-py36_0 ...
installing: pyyaml-3.12-py36hafb9ca4_1 ...
installing: pyzmq-17.0.0-py36h14c3975_0 ...
installing: qt-5.9.5-h7e424d6_0 ...
installing: qtpy-1.4.1-py36_0 ...
installing: rope-0.10.7-py36h147e2ec_0 ...
installing: ruamel_yaml-0.15.35-py36h14c3975_1 ...
installing: send2trash-1.5.0-py36_0 ...
installing: simplegeneric-0.8.1-py36_2 ...
installing: sip-4.19.8-py36hf484d3e_0 ...
installing: six-1.11.0-py36h372c433_1 ...
installing: snowballstemmer-1.2.1-py36h6febd40_0 ...
installing: sortedcontainers-1.5.10-py36_0 ...
installing: sphinxcontrib-1.0-py36h6d0f590_1 ...
installing: sqlalchemy-1.2.7-py36h6b74fdf_0 ...
installing: tblib-1.3.2-py36h34cf8b6_0 ...
installing: testpath-0.3.1-py36h8cadb63_0 ...
installing: toolz-0.9.0-py36_0 ...
installing: tornado-5.0.2-py36_0 ...
installing: typing-3.6.4-py36_0 ...
installing: unicodecsv-0.14.1-py36ha668878_0 ...
installing: wcwidth-0.1.7-py36hdf4376a_0 ...
installing: webencodings-0.5.1-py36h800622e_1 ...
installing: werkzeug-0.14.1-py36_0 ...
installing: wrapt-1.10.11-py36h28b7045_0 ...
installing: xlrd-1.1.0-py36h1db9f0c_1 ...
installing: xlsxwriter-1.0.4-py36_0 ...
installing: xlwt-1.3.0-py36h7b00a1f_0 ...
installing: babel-2.5.3-py36_0 ...
installing: backports.shutil_get_terminal_size-1.0.0-py36hfea85ff_2 ...
installing: cffi-1.11.5-py36h9745a5d_0 ...
installing: conda-verify-2.0.0-py36h98955d8_0 ...
installing: cycler-0.10.0-py36h93f1223_0 ...
installing: cytoolz-0.9.0.1-py36h14c3975_0 ...
installing: harfbuzz-1.7.6-h5f0a787_1 ...
installing: html5lib-1.0.1-py36h2f9c1c0_0 ...
installing: jedi-0.12.0-py36_1 ...
installing: more-itertools-4.1.0-py36_0 ...
installing: networkx-2.1-py36_0 ...
installing: nltk-3.3.0-py36_0 ...
installing: openpyxl-2.5.3-py36_0 ...
installing: packaging-17.1-py36_0 ...
installing: partd-0.3.8-py36h36fd896_0 ...
installing: pathlib2-2.3.2-py36_0 ...
installing: pexpect-4.5.0-py36_0 ...
installing: pillow-5.1.0-py36h3deb7b8_0 ...
installing: pyqt-5.9.2-py36h751905a_0 ...
installing: python-dateutil-2.7.3-py36_0 ...
installing: qtawesome-0.4.4-py36h609ed8c_0 ...
installing: setuptools-39.1.0-py36_0 ...
installing: singledispatch-3.4.0.3-py36h7a266c3_0 ...
installing: sortedcollections-0.6.1-py36_0 ...
installing: sphinxcontrib-websupport-1.0.1-py36hb5cb234_1 ...
installing: sympy-1.1.1-py36hc6d1c1c_0 ...
installing: terminado-0.8.1-py36_1 ...
installing: traitlets-4.3.2-py36h674d592_0 ...
installing: zict-0.1.3-py36h3a3bf81_0 ...
installing: astroid-1.6.3-py36_0 ...
installing: bleach-2.1.3-py36_0 ...
installing: clyent-1.2.2-py36h7e57e65_1 ...
installing: cryptography-2.2.2-py36h14c3975_0 ...
installing: cython-0.28.2-py36h14c3975_0 ...
installing: distributed-1.21.8-py36_0 ...
installing: get_terminal_size-1.0.0-haa9412d_0 ...
installing: gevent-1.3.0-py36h14c3975_0 ...
installing: isort-4.3.4-py36_0 ...
installing: jinja2-2.10-py36ha16c418_0 ...
installing: jsonschema-2.6.0-py36h006f8b5_0 ...
installing: jupyter_core-4.4.0-py36h7c827e3_0 ...
installing: navigator-updater-0.2.1-py36_0 ...
installing: nose-1.3.7-py36hcdf7029_2 ...
installing: pango-1.41.0-hd475d92_0 ...
installing: pyflakes-1.6.0-py36h7bd6a15_0 ...
installing: pygments-2.2.0-py36h0d3125c_0 ...
installing: pytest-3.5.1-py36_0 ...
installing: wheel-0.31.1-py36_0 ...
installing: flask-1.0.2-py36_1 ...
installing: jupyter_client-5.2.3-py36_0 ...
installing: nbformat-4.4.0-py36h31c9010_0 ...
installing: pip-10.0.1-py36_0 ...
installing: prompt_toolkit-1.0.15-py36h17d85b1_0 ...
installing: pylint-1.8.4-py36_0 ...
installing: pyopenssl-18.0.0-py36_0 ...
installing: pytest-openfiles-0.3.0-py36_0 ...
installing: pytest-remotedata-0.2.1-py36_0 ...
installing: flask-cors-3.0.4-py36_0 ...
installing: ipython-6.4.0-py36_0 ...
installing: nbconvert-5.3.1-py36hb41ffb7_0 ...
installing: urllib3-1.22-py36hbe7ace6_0 ...
installing: ipykernel-4.8.2-py36_0 ...
installing: requests-2.18.4-py36he2e5f8d_1 ...
installing: anaconda-client-1.6.14-py36_0 ...
installing: jupyter_console-5.2.0-py36he59e554_1 ...
installing: notebook-5.5.0-py36_0 ...
installing: qtconsole-4.3.1-py36h8f73b5b_0 ...
installing: sphinx-1.7.4-py36_0 ...
installing: anaconda-navigator-1.8.7-py36_0 ...
installing: anaconda-project-0.8.2-py36h44fb852_0 ...
installing: jupyterlab_launcher-0.10.5-py36_0 ...
installing: numpydoc-0.8.0-py36_0 ...
installing: widgetsnbextension-3.2.1-py36_0 ...
installing: ipywidgets-7.2.1-py36_0 ...
installing: jupyterlab-0.32.1-py36_0 ...
installing: spyder-3.2.8-py36_0 ...
installing: _ipyw_jlab_nb_ext_conf-0.1.0-py36he11e457_0 ...
installing: jupyter-1.0.0-py36_4 ...
installing: bokeh-0.12.16-py36_0 ...
installing: bottleneck-1.2.1-py36haac1ea0_0 ...
installing: conda-4.5.4-py36_0 ...
installing: conda-build-3.10.5-py36_0 ...
installing: datashape-0.5.4-py36h3ad6b5c_0 ...
installing: h5py-2.7.1-py36ha1f6525_2 ...
installing: imageio-2.3.0-py36_0 ...
installing: matplotlib-2.2.2-py36h0e671d2_1 ...
installing: mkl_fft-1.0.1-py36h3010b51_0 ...
installing: mkl_random-1.0.1-py36h629b387_0 ...
installing: numpy-1.14.3-py36hcd700cb_1 ...
installing: numba-0.38.0-py36h637b7d7_0 ...
installing: numexpr-2.6.5-py36h7bf3b9c_0 ...
installing: pandas-0.23.0-py36h637b7d7_0 ...
installing: pytest-arraydiff-0.2-py36_0 ...
installing: pytest-doctestplus-0.1.3-py36_0 ...
installing: pywavelets-0.5.2-py36he602eb0_0 ...
installing: scipy-1.1.0-py36hfc37229_0 ...
installing: bkcharts-0.2-py36h735825a_0 ...
installing: dask-0.17.5-py36_0 ...
installing: patsy-0.5.0-py36_0 ...
installing: pytables-3.4.3-py36h02b9ad4_2 ...
installing: pytest-astropy-0.3.0-py36_0 ...
installing: scikit-learn-0.19.1-py36h7aa7ec6_0 ...
installing: astropy-3.0.2-py36h3010b51_1 ...
installing: odo-0.5.1-py36h90ed295_0 ...
installing: scikit-image-0.13.1-py36h14c3975_1 ...
installing: statsmodels-0.9.0-py36h3010b51_0 ...
installing: blaze-0.11.3-py36h4e06776_0 ...
installing: seaborn-0.8.1-py36hfad7ec4_0 ...
installing: anaconda-5.2.0-py36_3 ...
installation finished.
Do you wish the installer to prepend the Anaconda3 install location
to PATH in your /root/.bashrc ? [yes|no] # 是否希望安装程序在 Anaconda3 安装位置前面到 /root/.bashrc 中的 PATH ?
[no] >>> yes
You may wish to edit your .bashrc to prepend the Anaconda3 install location to PATH:
export PATH=/home/software/anaconda3/bin:$PATH
Thank you for installing Anaconda3!
===========================================================================
Anaconda is partnered with Microsoft! Microsoft VSCode is a streamlined
code editor with support for development operations like debugging, task
running and version control.
To install Visual Studio Code, you will need:
- Administrator Privileges
- Internet connectivity
Visual Studio Code License: https://code.visualstudio.com/license
Do you wish to proceed with the installation of Microsoft VSCode? [yes|no] # 是否要继续安装 Microsoft VSCode?
>>> no
  • 配置
vim /etc/profile
# 添加到最后,注意路径
export CONDA_HOME=/home/software/anaconda3
export PATH=$PATH:$CONDA_HOME/bin
source /etc/profile
  • 测试是否配置成功
[root@master ~]# python3
Python 3.6.5 |Anaconda, Inc.| (default, Apr 29 2018, 16:14:56)
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
  • 查看路径
[root@master software]# whereis python3
python3: /home/software/anaconda3/bin/python3 /home/software/anaconda3/bin/python3.6-config /home/software/anaconda3/bin/python3.6m /home/software/anaconda3/bin/python3.6 /home/software/anaconda3/bin/python3.6m-config
  • 打开pycharm,点击右下角

  • 填写IP和用户名

  • 输入密码

  • 选择python3的路径

  • 查看右下角

  • 查看已安装的包

  • 安装包

[root@master ~]# pip install -i https://mirrors.aliyun.com/pypi/simple/ pyhive pymysql jieba pyspark==3.2.1
Looking in indexes: https://mirrors.aliyun.com/pypi/simple/
Collecting pyhive
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",),)': /pypi/simple/pyhive/
Could not fetch URL https://mirrors.aliyun.com/pypi/simple/pyhive/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='mirrors.aliyun.com', port=443): Max retries exceeded with url: /pypi/simple/pyhive/ (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",),)) - skipping
Could not find a version that satisfies the requirement pyhive (from versions: )
No matching distribution found for pyhive
Could not fetch URL https://mirrors.aliyun.com/pypi/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='mirrors.aliyun.com', port=443): Max retries exceeded with url: /pypi/simple/pip/ (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",),)) - skipping
  • 解决方案,找1个可以正常安装的
# 默认安装的包的位置
/home/software/anaconda3/lib/python3.6/site-packages
# 进入该目录
/home/software/anaconda3/lib/python3.6
# 压缩
tar -zcvf site-packages.tar.gz site-packages
# 将这个压缩包上传到不能使用pip安装的服务器上的如下路径
/home/software/anaconda3/lib/python3.6
# 删除原来的文件夹
rm -rf site-packages
# 解压
tar -zxvf site-packages.tar.gz
  • 测试,打开python3,执行如下
[root@master python3.6]# python3
Python 3.6.5 |Anaconda, Inc.| (default, Apr 29 2018, 16:14:56)
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from pyspark.sql import SparkSession
# 退出
>>> exit()
[root@node1 bin]# python2
Python 2.7.5 (default, Aug 7 2019, 00:51:29)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
[root@node1 bin]# python
Python 2.7.5 (default, Aug 7 2019, 00:51:29)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
# 查看链接
[root@node1 bin]# cd /usr/bin
[root@node1 bin]# ll /usr/bin/python
lrwxrwxrwx. 1 root root 7 Mar 17 2021 /usr/bin/python -> python2
[root@node1 bin]# ll python
lrwxrwxrwx. 1 root root 7 Mar 17 2021 python -> python2
[root@node1 bin]# ll python2
lrwxrwxrwx. 1 root root 9 Mar 17 2021 python2 -> python2.7
[root@node1 bin]# ll python2.7
-rwxr-xr-x. 1 root root 7216 Aug 7 2019 python2.7
[root@node1 bin]# cd /home/software/anaconda3/bin
lrwxrwxrwx 1 root root 9 Jan 18 08:59 python -> python3.6
lrwxrwxrwx 1 root root 9 Jan 18 08:59 python3 -> python3.6
-rwxrwxr-x 1 root root 3752088 Jan 18 08:59 python3.6
lrwxrwxrwx 1 root root 17 Jan 18 08:59 python3.6-config -> python3.6m-config
lrwxrwxrwx 1 root root 9 Jan 18 08:59 python3.6m -> python3.6
-rwxrwxr-x 1 root root 3429 Jan 18 08:59 python3.6m-config
lrwxrwxrwx 1 root root 17 Jan 18 08:59 python3-config -> python3.6m-config
-rwxrwxr-x 1 root root 80 Jan 18 09:00 pyuic5
lrwxrwxrwx 1 root root 10 Jan 18 08:59 pyvenv -> pyvenv-3.6
-rwxrwxr-x 1 root root 452 Jan 18 08:59 pyvenv-3.6
# 创建软连接解决
ln -s /home/software/anaconda3/bin/python /usr/bin/python3
ln -s /usr/bin/python2.7 python
  • 在pycharm中执行报错
# 报错如下
SyntaxError: Non-ASCII character ‘\xe8’ in file xxx.py on line 4, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
解决方案:在第1行添加如下
# -*- coding: utf-8 -*-
# coding:utf-8
posted @   DogLeftover  阅读(534)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
· 字符编码:从基础到乱码解决
· 提示词工程——AI应用必不可少的技术
历史上的今天:
2021-11-28 Mybatis plus入门(八):子查询、嵌套查询
点击右上角即可分享
微信分享提示