Python安装:
- 点击 https://www.python.org,进入downloads并设置环境变量。
- Python version:Python3为主流。
- Python OS: Python for Windows, Linux/UNIX, Mac OS X, Other。
- 系统类型:Windows X86-64 or Windows X86。
- 安装方式:embeddable zip file, executable installer, web-based installer。
- 环境安装:(1)点击add Python to PATH;(2)添加Python路径到系统环境变量中PATH中。
Virtualbox 安装:
- 点击https://www.virtualbox.org/wiki/Downloads 下载安装包,默认安装。
- 注意: in order to avoid unnecessary trouble, when you install the virtual machine, turn off computer housekeeper, anti-virus software and so on。
- 内存分配大于1G,检查电脑是否开启虚拟化。
- 导入Linux系统包Ubuntu,new->Type and Version (Linux and Ubuntu 64-bit)->import Ubuntu18.vmdk
Xshell 安装: 默认安装。
如何Xshell 连接 Virtualbox:
- 设置IP和端口号 Virtualbox, Settings->Network->Adapter1->Advanced->Port Forwarding->Host Port(Unusing 1234) ->Guest Port 22。
- 开启Virtualbox, Start->输入命令ifconfige查询inet(ip)(host:127.0.0.1 port:1234)。
- Xshell连接Virtualbox, 点击File->New Session Properties->填写Name, Host and Port Number (包括username和password:)。
pycharm 安装和激活:
- pycharm 下载,https://www.jetbrains.com/pycharm/download/, 其余默认。
- 激活,下载JetbrainsCrack-2.6.10-release-enc.jar,https://pan.baidu.com/s/18w_vH0pvnjUOmhm9bkQgpA ,password:nutj 。
- 把JetbrainsCrack-2.6.10-release-enc.jar 复制到文件 D:\pycharm\JetBrains\PyCharm 2018.3.3\bin, 并在文件里pycharm.exe.vmoptions和pycharm64.exe.vmoptions 添加 -javaagent:D:\pycharm\JetBrains\PyCharm 2018.3.3\bin\JetbrainsCrack-2.6.10-release-enc.jar 。
- 点击pycharm,然后填写激活码即可。
pycharm 连接虚拟机:
1.设置连接虚拟机的ip、端口号、用户名和密码。settings->Project Interpreter->add->SSH Interpreter->127.0.0.1 1234 and pyvip ->password->修改interpreter path /usr/bin/python3.6到/home/vi…/python3.6.exe。
2.更新代码到虚拟机。tools->Deployment->configuration->(connection ) host,port,user name,password ->(Mappings) Deployment path /home/pyvip/py_case and Web path /。
3.自动上传,tools->Deployment->options-> Upload changed files… Always。
references:
https://www.jianshu.com/p/7e31bf8dbdb4