摘要:
方法一: 1、官网下载pip包: 2、下载完成后解压到一个文件夹,命令行进入解压好的文件夹: % Python setup.py install 方法二: $ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py # 下载安装脚本 $ sud 阅读全文
随笔分类 - Python
python3报错ModuleNotFoundError: No module named 'Queue'
2021-04-22 15:39 by Tanwheey, 2113 阅读, 收藏, 编辑
摘要:
Traceback (most recent call last): File "test.py", line 4, in <module> import QueueModuleNotFoundError: No module named 'Queue' Process finished with 阅读全文
PyCharm 图标 c、m、F、f、v、p 分别代表什么含义?
2021-04-16 13:54 by Tanwheey, 2433 阅读, 收藏, 编辑
摘要:
Pycharm变量、函数、方法、属性都有提示。特别注意:小写的 f 代表类属性,即 Field;大写的 F 代表 Function,即普通函数。 IconDescription Python script Class Method Function Field Variable Property P 阅读全文
python实现多主机多线程监控cpu和内存
2021-04-15 17:05 by Tanwheey, 694 阅读, 收藏, 编辑
摘要:
# -*- coding: utf-8 -*-from paramiko import SSHClient, AutoAddPolicyfrom threading import Threadimport time, xlwtclass Resource: def __init__(self, ho 阅读全文
python3实现xshell登录远端服务器
2021-04-15 17:03 by Tanwheey, 378 阅读, 收藏, 编辑
摘要:
使用原生的系统terminal完成登录,1、安装 pexpect 模块$ pip install pexpect2、案例# -*- coding: utf-8 -*-from paramiko import SSHClient, AutoAddPolicy def ssh_init(self): # 阅读全文
python3实现json格式转其他任意格式
2021-04-15 16:18 by Tanwheey, 165 阅读, 收藏, 编辑
摘要:
1、{"key1":"value1","key2":"value2"}转key1=value1;key2=value2 # json 转 cookies参数def jsonDataToCookiesParams(params_data): strParams = "" nums = 0 max_nu 阅读全文
python 3 解决 ERROR: Could not find a version that satisfies the requirement xxx 的问题
2021-03-02 13:41 by Tanwheey, 5721 阅读, 收藏, 编辑
摘要:
问题:pyhton 3安装module报错ERROR: Could not find a version that satisfies the requirement config.paths % pip install config.paths ERROR: Could not find a ve 阅读全文
MAC pycharm安装
2020-05-07 16:44 by Tanwheey, 226 阅读, 收藏, 编辑
摘要:
1、先去pycharm官网下载一个dmg包,地址:https://www.jetbrains.com/pycharm/download/ 2、选中mac版的Professional专业版就行,下载完之后傻瓜式安装 3、打开软件,在License server address中填入http://xid 阅读全文
Selenium python+chrome/firefox报错Message: 'geckodriver' executable needs to be in PATH.
2020-05-07 09:43 by Tanwheey, 495 阅读, 收藏, 编辑
摘要:
>>> from selenium.webdriver import Firefox >>> driver = Firefox () 执行脚本报错: Traceback (most recent call last): File "/Users/xxx/Documents/selenium_py/i 阅读全文
Selenium python+chrome/firefox报错Message: Can not connect to the Service chromedriver
2020-05-06 19:27 by Tanwheey, 1289 阅读, 收藏, 编辑
摘要:
1、执行 >>> from selenium.webdriver import Chrome #添加path后执行 >>> driver = Chrome() 或>>> from selenium.webdriver import Chrome #驱动位置驱动 >>> Chrome(executab 阅读全文
Mac os x安装IDEAL及配置JDK和Maven
2019-07-22 23:16 by Tanwheey, 1545 阅读, 收藏, 编辑
摘要:
此文章是在已安装好IDEAL前提下进行配置jdk和maven的操作文档。 1、 下载并配置JDK及Maven Mac下载并配置JDK方法: 详见Mac安装JDK和JMeter5-安装JDK Mac下载并配置Maven方法: 打开Maven官网下载页面:https://maven.apache.org 阅读全文
Python运行出现:ModuleNotFoundError: No module named 'logbook',解决办法
2019-07-11 19:34 by Tanwheey, 6022 阅读, 收藏, 编辑
摘要:
ModuleNotFoundError: No module named 'xlrd' ModuleNotFoundError: No module named 'xlwt' AttributeError: module 'requests' has no attribute 'get' Modul 阅读全文
Windows及MAC 安装Python3.7.4
2019-07-10 17:40 by Tanwheey, 4158 阅读, 收藏, 编辑
摘要:
Windows没有Python环境,Mac自带Python 2,所以开发者需要下载Python 3进行开发相关工作,此文章介绍如何安装Python,Mac安装前可以在终端数输入python查看自带版本。 1、下载最新版python(目前是Python3.7.4) 进入官网首页:https://www 阅读全文