• 服务器上安装anaconda


    1、在anaconda网站下载安装包:

    清华镜像网站:https://repo.continuum.io/archive/index.html

    2、下载最新版本为python3 ,Linux64位的:

    Anaconda3-5.3.0-Linux-x86_64.sh

    3、采用命令将sh 文件上传到服务器上:【先cd到要存储的目录下】命令 为 :rz

    4、安装:【需要在文件所在的位置】

    命令:bash ./Anaconda3-5.3.0-Linux-x86_64.sh

    5、默认安装位置为 /home/wyl/下,wyl为普通用户名。安装过程一路按yes。

    6、设置环境:在.bashrc中修改,因为其是一个隐藏文件,在根目录下所以需要 使用命令查看:

    ls -a

    采用gedit方式修改时报错,应该是服务器上没有这种界面。

    所以采用vim方式将环境变量加进去:

    命令:sudo vi ~/.bashrc

    加入内容:

    export PATH="/home/wyl/anaconda3/bin:$PATH"
    export LD_LIBRARY_PATH="/home/wyl/anaconda3/lib:$LD_LIBRARY_PATH"

    7、重启终端。

    8、启动anaconda:

    source ~/anaconda3/bin/activate root

    9、关闭:

    anaconda-navigator

    10、在anaconda下跑python代码:

    先启动anaconda,然后cd到代码的路径下:

    输入命令:python 文件名.py

  • 相关阅读:
    UVA11825 Hackers' Crackdown
    UVA 11346 Probability
    Codeforces 12 D Ball
    bzoj 4766: 文艺计算姬
    Codeforces 757 F Team Rocket Rises Again
    [HAOI2011] problem C
    Atcoder 3857 Median Sum
    bzoj4399 魔法少女LJJ
    bzoj2638 黑白染色
    bzoj4197 [Noi2015]寿司晚宴
  • 原文地址:https://www.cnblogs.com/Lee-yl/p/9734891.html
Copyright © 2020-2023  润新知