如何在Mac OS上安装pytest、setuptools、wget |
您所在的位置:网站首页 › python3怎么安装pytest › 如何在Mac OS上安装pytest、setuptools、wget |
本文主要介绍如何在Mac OS上安装pytest,以自己实际安装为例。同时补充介绍了Mac OS上安装setuptools和Mac OS上安装wget的方法 Mac OS上安装pytest由于Mac OS上自带python2.7,已是目标版本,不需要更新了,在此基础上介绍安装pytest的主要步骤: 安装pip,在终端中输入: sudo easy_install pip 接着安装pytest: sudo pip install -U pytest 测试是否安装成功: py.test --version在安装过程中遇到了一些问题,主要问题有wget方法不能用 Mac OS上安装setuptools可以参考 https://pypi.python.org/pypi/setuptools curl https://bootstrap.pypa.io/ez_setup.py -o - | python也可以使用wget命令,但是需要mac os中有wget命令。 wget https://bootstrap.pypa.io/ez_setup.py -O - | python Mac OS上安装wget:一般使用软件包管理器(package manager),自动download、compile、install,会自动寻找依赖关系的包然后自动安装。相关软件包管理器有: homebrew(http://mxcl.github.com/homebrew/)MacPorts(http://www.macports.org/)等安装好homebrew或者MacPorts后,可以进行wget的安装: brew install wget port install wget |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |