目前存在:網絡限制不讓訪問外網或者外網速度慢下載依賴超時等問題,所以我們需要采用相對離線的方式安裝我們的依賴。
第一種:公司內網安裝python依賴,如果公司沒有的話看看國內的源
阿里雲 http://mirrors.aliyun.com/pypi/simple/
中國科技大學 https://pypi.mirrors.ustc.edu.cn/simple/
豆瓣(douban) http://pypi.douban.com/simple/
清華大學 https://pypi.tuna.tsinghua.edu.cn/simple/
中國科學技術大學 http://pypi.mirrors.ustc.edu.cn/simple/
pip3 install allure-pytest==2.8.6 -i http://pypi.douban.com/simple/
第二種:相對於比較小的安裝包直接放到項目中或者內網沒有的包
從官網下載包:https://pypi.org/
推薦使用built Distribution安裝:
下載好*.whl文件放到項目目錄中安裝命令:
pip install allure_pytest-2.9.45-py3-none-any.whl
source Distribution安裝:
首先需要解壓tar.gz,然后再執行:
python3 setup.py install