pip

在docker中pip使用私有源进行依赖安装依然请求外网源的问题处理

匆匆过客 提交于 2021-01-16 01:53:39
近期在进行应用容器化,需要基于python2.7.12构建应用镜像。在docker中配置了pip.conf指定使用内网源,但依然发现有依赖安装不成功。 异常信息是连接官方源失败,信息如下: Collecting positional>=1.0.1 (from python-keystoneclient==3.5.1->-r /monitor/requirements.txt (line 7)) Downloading http://10.xx.xxx.xxx/repository/pypi-proxy/packages/positional/1.2.1/positional-1.2.1.tar.gz Complete output from command python setup.py egg_info: Download error on https://pypi.python.org/simple/pbr/: [Errno 99] Cannot assign requested address -- Some packages may not be found! Couldn't find index page for 'pbr' (maybe misspelled?) Download error on https://pypi.python.org/simple/:

python3.7安装, 解决pip is configured with locations that require TLS/SSL问题

99封情书 提交于 2021-01-15 19:24:02
python3.7安装, 解决pip is configured with locations that require TLS/SSL问题 参考文章: (1)python3.7安装, 解决pip is configured with locations that require TLS/SSL问题 (2)https://www.cnblogs.com/jasonLiu2018/articles/10730605.html 备忘一下。 来源: oschina 链接: https://my.oschina.net/u/4437974/blog/4536130

Win10安装Python3.9

*爱你&永不变心* 提交于 2021-01-15 18:52:20
1.下载Python3.9.1 Python 安装包下载地址: https://www.python.org/downloads/ 打开该链接,点击下图中的版本号或者 Download 按钮进入对应版本的下载页面,滚动到最后即可看到各个平台的 Python 安装包。 这里点击安装最新版的Python 3.9.1 对前缀的说明: 以 Windows installer (64-bit) 开头的是 64 位的 Python 安装程序; 以 Windows installer (32-bit) 开头的是 32 位的 Python 安装程序。 对后缀的说明: embeddable zip file 表示 .zip 格式的绿色免安装版本,可以直接嵌入(集成)到其它的应用程序中; executable installer 表示 .exe 格式的可执行程序,这是完整的离线安装包,一般选择这个即可; web-based installer 表示通过网络安装的,也就是说下载到的是一个空壳,安装过程中还需要联网下载真正的 Python 安装包。 这里我选择的是 Windows installer (64-bit) ,也即 64 位的完整的离线安装包。 2.安装Python3.9.1 Python 安装向导 双击下载得到的 python-3.9.1-amd64.exe,就可以正式开始安装 Python

python3.7安装, 解决pip is configured with locations that require TLS/SSL问题

空扰寡人 提交于 2021-01-15 18:03:24
python3.7安装, 解决pip is configured with locations that require TLS/SSL问题 参考文章: (1)python3.7安装, 解决pip is configured with locations that require TLS/SSL问题 (2)https://www.cnblogs.com/zmdComeOn/p/11712352.html 备忘一下。 来源: oschina 链接: https://my.oschina.net/u/3797416/blog/4905259

selenium的安装使用

狂风中的少年 提交于 2021-01-14 15:58:10
安装selenium不少人使用pip命令来安装selenium,辛辛苦苦安装完之后,还是不能使用。所以我们可以是直接使用编译器,pycharm直接安装selenium扩展包。 file中点击settings 在Settings中点击Project Interpreter,点击加号就可以安装各种需要的扩展包 直接搜索selenium,选择selenium,点击Install Package,等selenium安装好就可以使用selenium了。 在安装谷歌驱动,查看自己电脑上的谷歌版本 访问http://chromedriver.storage.googleapis.com/index.html,下载对应的谷歌驱动. 下载完成之后,把谷歌驱动放到项目的文件夹中 打开浏览器,访问百度 这就是selenium安装使用了。 接口测试工具可以使用国产的接口测试工具: apipost 来源: oschina 链接: https://my.oschina.net/u/4599769/blog/4898891

robot framework + win7 64 上的安装

别来无恙 提交于 2021-01-14 09:27:35
1、安装 python 2.7 2、cmd 管理模式 python -m pip install --upgrade pip pip install robotframework==3.0.2 《注意:::》 如果安装最新的版本,但是它里面的没有pybot 需要自己编一个如下的pybot.bat @Echo off python -m robot.run %* 或者: robot framework创建完测试用例后,点击start按钮出现pybot这个报错信息。 第一步,   确认环境变量是否配置成功,Python -V还是Python2 -V(版本需要确认清楚),   如果Python环境都有问题的话,先配置一下,具体不做详细说明。 通常第一步问题都能解决, 第二步,   查看你安装robot framework的Python目录下,[Python目录]\Script文件夹下,是否有pybot.bat文件,   最简单的操作就是cmd命令,“where pybot.bat”,   如果没有,如图,Execution Profile的选项从pybot切换回custom script 在弹出的script to run tests:找到[Python目录]\Script\robot.exe文件,   start,OK 原因:新版本不支持pybot

时隔五年,Scrapyd 终于原生支持 basic auth

被刻印的时光 ゝ 提交于 2021-01-14 08:24:04
Issue in 2014 scrapy/scrapyd/issues/43 Pull request in 2019 scrapy/scrapyd/pull/326 试用 1. 安装: pip install -U git+https: // github.com/my8100/scrapyd.git@add_basic_auth 2. 更新配置文件 scrapyd.conf ,其余配置项详见 官方文档 [scrapyd] username = yourusername password = yourpassword 3. 启动: scrapyd In [1]: import requests In [ 2]: requests.get( ' http://127.0.0.1:6800/ ' ).status_code Out[ 2]: 401 In [ 3]: requests.get( ' http://127.0.0.1:6800/ ' , auth=( ' admin ' , ' admin ' )).status_code Out[ 3]: 401 In [ 4]: requests.get( ' http://127.0.0.1:6800/ ' , auth=( ' yourusername ' , ' yourpassword ' )).status_code

Pulsar 2.6.0 到底更新了个啥?

最后都变了- 提交于 2021-01-14 06:52:37
这周我们请到了来自 StreamNative 的高级工程师——李鹏辉,为大家详细介绍一些关于 Pulsar 2.6.0 版本新特性。 首先回顾一些最近一周 Pulsar 的相关进展: 1. 新增 PIP-68:Exclusive producer https://github.com/apache/pulsar/wiki/PIP-68%3A-Exclusive-Producer 2. Pulsar 2.6.1 版本也已在计划中,敬请期待! 接下来就一起看看关于 Pulsar 2.6.0 新特性吧! PIP 相关 🖌 PIP-37:支持传输大消息体的消息 Pulsar 默认支持发送 最大为 5 MB 的消息,如果超过,则 producer 不允许发送此消息。此 PIP 则通过将大消息体的消息拆分成多个 chunk,使其支持生产和消费大消息体的消息。 读取时则直接在 metadata 里获取「几个 chunk」目标信息,consumer 会根据获取到的目标信息,进行大消息组装。 目前,该功能仅对 non-shared subscription 有效,并对客户端有改动。如需使用该功能,你需要将 Pulsar 客户端升级至 2.6.0。使用该特性可以在生产端启用消息 trunking 机制。 更多此特性细节讲解,可参考视频回放 05:00-09:35 时间段。 🖌 PIP-39:新增

在云服务搭建jupyter环境

戏子无情 提交于 2021-01-14 04:48:50
一.环境配置 centeos7 python3 二.安装jupyter notebook   1.安装jupyter   安装Jupyter Notebook   通过pip安装Jupyter Notebook # 安装jupyter notebook python3 - m pip install jupyter # 安装完会在python3的包管理器,创建一个软连接以便在任何地方都可以直接执行 ln -s /usr/local/python3/bin/jupyter /usr/bin/jupyter   通过jupyter notebook命令启动Jupyter服务器,验证是否安装成功 [root@instance-hrnebyqu bin] # jupyter notebook --allow-root [I 11:26:22.273 NotebookApp] JupyterLab beta preview extension loaded from /root/anaconda3/lib/python3.6/site-packages/ jupyterlab [I 11:26:22.273 NotebookApp] JupyterLab application directory is /root/anaconda3/share/jupyter/ lab [I 11:26

pytest文档27-pytest分布式执行(pytest-xdist)

放肆的年华 提交于 2021-01-13 23:04:35
前言 平常我们手工测试用例非常多时,比如有1千条用例,假设每个用例执行需要1分钟。如果一个测试人员执行需要1000分钟才能执行完,当项目非常紧急的时候, 我们会用测试人力成本换取时间成本,这个时候多找个小伙伴把任务分成2部分,于是时间缩减一半。如果是十个人一起执行,1000个用例理论上只需100分钟就能完成,时间缩短到了1/10。大大节省的测试时间,为项目节省了时间成本。 pytest 3.6.3 pytest-allure-adaptor 1.7.10 pytest-forked 0.2 pytest-html 1.19.0 pytest-metadata 1.7.0 pytest-repeat 0.7.0 pytest-xdist 1.23.2 同样道理,当我们测试用例非常多的时候,一条条执行,很显然会比较慢,那么如何让测试用例并行执行呢,这就是我们接下来要讲的pytest分布式执行插件pytest-xdist pytest-xdist cmd里面使用pip安装,目前版本号Version: 1.23.2 pip install pytest-xdist >pip show pytest-xdist Name: pytest-xdist Version: 1.23.2 Summary: pytest xdist plugin for distributed testing and