配置ABCDEN的运行环境

配置ABCDEN的运行环境

本为以linux系统为例,讲解ABCDEN运行环境的配置

首先下载ABCDEN的程序
http://www.birfied.com/file/SCFT.zip

解压后,首先配置运行所需的库,在cmd中运行

pip install numpy
pip install paramiko
pip install mayavi
pip install vtk
pip install PyQt5
pip install pygments
pip install Pyside

下载一个文件http://www.birfied.com/file/array_source.py
替换到mayavi安装目录下的sources文件夹中
然后在matlab的安装目录下运行来安装MATLAB API for Python

cd root_matlab/extern/engine/python
python setup.py install

接着生成一个.ssh密钥以配置免密登陆,这里以linux系统为例

ssh-keygen -t rsa
ssh-copy-id -i ~/.ssh/id_rsa.pub user@server

打开main.py
找到

    #Load sftp
    private_key = paramiko.RSAKey.from_private_key_file('C:/Users/Birfy/.ssh/id_rsa')
    transport = paramiko.Transport(('10.158.131.62', 22))
    transport.connect(username='cdy', pkey=private_key)
    sftp = paramiko.SFTPClient.from_transport(transport)
    setText('SFTP IS LOADED\n')

    #Load ssh
    ssh = paramiko.SSHClient()
    ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
    ssh.connect(hostname='10.158.131.62',port=22,username='cdy')
    setText('SSH IS LOADED\n')

替换为

    #Load sftp
    private_key = paramiko.RSAKey.from_private_key_file('~/.ssh/id_rsa')
    transport = paramiko.Transport(('$Server', 22))
    transport.connect(username='$User', pkey=private_key)
    sftp = paramiko.SFTPClient.from_transport(transport)
    setText('SFTP IS LOADED\n')

    #Load ssh
    ssh = paramiko.SSHClient()
    ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
    ssh.connect(hostname='$Server',port=22,username='$User')
    setText('SSH IS LOADED\n')

在SCFT的安装目录下运行

python main.py

即可开始体验外表简约而功能强大的的ABCDEN

One thought on “配置ABCDEN的运行环境

发表评论