美文网首页
Python Packet

Python Packet

作者: 奉先 | 来源:发表于2023-01-09 15:53 被阅读0次

    1. Linux安装Anaconda:

    Linux上安装anaconda很简单,官网下载安装文件 : Anaconda3-2022.10-Linux-x86_64.sh
    我切换到了man25用户,直接安装:

    bash Anaconda3-2022.10-Linux-x86_64.sh
    

    一路回车,选择一个安装目录即可。
    安装完成后,切换回root用户,配置环境变量 。

    su - root
    vim /etc/profile
    

    在文件的最后增加anaconda的环境目录 :

    # anaconda3
    export PATH=/home/man25/anaconda3/bin:$PATH
    source /etc/profile     #生效刚才的改动
    

    这时候,可以测试下是否安装成功了,因为centOS默认安装了python 2.7 。在完成了上述步骤后,在输入python后,我们进入了pthon 3.x版本 :

    [root@localhost ~]# source /etc/profile
    [root@localhost ~]# python
    Python 3.9.13 (main, Aug 25 2022, 23:26:10) 
    [GCC 11.2.0] :: Anaconda, Inc. on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> 
    

    相关文章

      网友评论

          本文标题:Python Packet

          本文链接:https://www.haomeiwen.com/subject/ogzpcdtx.html