服务器的配置

服务器配置

  • 学生版pycharm安装
  • 服务器安装anaconda3(3.5.2版本对应python3.6)
    • 1.安装anaconda3报错
      • 解决方法--安装bzip2
    • 2.更新已存在的目录报错
      • 解决方法 -u指令
    • 安装成功(需新建个终端)
  • 服务器安装python
    • 1.软连接(python3-->python)
  • 安装pytorch(CPU)
    • 1.激活虚拟环境时出错
      • 解决方法:
    • 安装带cuda的pytorch(没必要)
    • cuda与pytorch版本对应
    • 安装CUDA
    • 服务器切换CUDA版本
    • nvcc报错
      • 解决方法:

学生版pycharm安装

链接

服务器安装anaconda3(3.5.2版本对应python3.6)

超详细版

1.安装anaconda3报错

[/root/anaconda3] >>> 
PREFIX=/root/anaconda3
./Anaconda3-5.2.0-Linux-x86_64.sh: line 350: bunzip2: command not found
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors

解决方法–安装bzip2

yum install -y bzip2

2.更新已存在的目录报错

[/root/anaconda3] >>> 
ERROR: File or directory already exists: '/root/anaconda3'
If you want to update an existing installation, use the -u option.

解决方法 -u指令

bash Anaconda3-5.2.0-Linux-x86_64.sh -u

安装成功(需新建个终端)

For this change to become active, you have to open a new terminal.

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]
>>> no
[root@iZ8vb83k83fmv00mvromkqZ ~]# conda -V
bash: conda: command not found
[root@iZ8vb83k83fmv00mvromkqZ ~]# bash
[root@iZ8vb83k83fmv00mvromkqZ ~]# conda -V
conda 4.5.4

服务器安装python

实用版

1.软连接(python3–>python)

 ln -s /usr/local/python3/bin/python3 /usr/bin/python

安装pytorch(CPU)

超详细版

1.激活虚拟环境时出错

[root@iZ8vb83k83fmv00mvromkqZ ~]# conda activate

CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
If your shell is Bash or a Bourne variant, enable conda for the current user with

    $ echo ". /root/anaconda3/etc/profile.d/conda.sh" >> ~/.bashrc

or, for all users, enable conda with

    $ sudo ln -s /root/anaconda3/etc/profile.d/conda.sh /etc/profile.d/conda.sh

The options above will permanently enable the 'conda' command, but they do NOT
put conda's base (root) environment on PATH.  To do so, run

    $ conda activate

in your terminal, or to put the base environment on PATH permanently, run

    $ echo "conda activate" >> ~/.bashrc

Previous to conda 4.4, the recommended way to activate conda was to modify PATH in
your ~/.bashrc file.  You should manually remove the line that looks like

    export PATH="/root/anaconda3/bin:$PATH"

^^^ The above line should NO LONGER be in your ~/.bashrc file! ^^^

解决方法:

source activate

安装带cuda的pytorch(没必要)

cuda与pytorch版本对应

链接: link

安装CUDA

其他版本或者服务器类型方法相似

安装链接

服务器切换CUDA版本

链接

nvcc报错

[root@iZ8vb83k83fmv00mvromkqZ ~]# nvcc -V
bash: nvcc: command not found

解决方法:

link

你可能感兴趣的:(python,服务器,运维)