一、py解释器安装
1、下载地址:https://www.python.org/

2、运行安装软件,勾选添加环境变量,使用自定义安装:

3、选择合适的安装位置,其他均使用默认选项即可
4、验证python是否安装成功

二、pycharm(IDE):集成开发环境
1、下载地址:https://www.jetbrains.com/pycharm/

2、双击下载成功的安装包,进行安装,一路next,注意勾选以下两项

安装最后选择打开pycharm
三、安装pip
1、下载地址:https://pypi.org/project/pip/#files

2、解压下载的文件,进入该目录,进行安装:python setup.py install

四、安装第三方库
1、requests:

ps:安装过程中出错

原因:pip版本过低导致的,需要升级pip。直接使用升级命令:python -m install --upgrade pip,出现如下提示:

经查,使用如下命令,可升级成功

再次执行安装命令,即可:

2、安装selenium

3、安装wxpython-GUI图形库

4、安装robotframework及robotframework-ride

ps:安装完成后,可使用pip list检查安装是否成功

ps:安装完成后,cmd运行:python ride.py,出现如下报错:

解决方法是:找到application.py文件(D:\python\Lib\site-packages\robotide\application),增加一行

遗留问题:与python版本有关,需要降级到3.6.8

5、进行python降级
(1)首先安装anaconda:https://www.anaconda.com/products/individual#
下载成功后,以管理员身份运行,安装完成后,添加conda的script文件夹绝对路径至环境变量PATH中:

检查安装是否成功:

(2)进行python降级

解决方案:在c盘用户下创建一个.condarc文件:输入以下内容,重新运行conda命令即可
channels:
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
show_channel_urls: true
ssl_verify: false
网友评论