2022年2月11日

Python: Pycharm第三方库的安装及使用方法

目录 1、Pycharm第三方库的安装 2、pycharm常用快捷键 1、编辑(Editing) 2、查找/替换(Search/Replace) 3、运行(Running) 4、调试(Debugging) 5、导航(Navigation) 6、搜索相关(Usage Search) 7、重构(Refactoring) 8、控制VCS/Local History 9、模版(Live Templates) 10、基本(General) 3、pycharm常用设置 4、pycharm环境和路径设置 python解释器路径 pycharm中进行python包管理 python脚本解释路径 console执行路径和当前工作目录 pycharm配置os.environ环境 pycharm设置外部工具 python2转python3最快方式 1、Pycharm第三方库的安装 方…
2022年2月11日

Python OSError: [Errno 22] Invalid argument: 路径

在学习从文件读取数据中,写了个示例代码,读取不在同一个目录的file.txt,运行后报这个Python OSError: [Errno 22] Invalid argument:错误: (1)、首先,在F盘的python_stu中新增了一个file.txt,同时在F盘的python_stu文件目录底下新增一个file文件夹,里面有个file_reader.py来读取python_stu文件目录底下的file.txt,代码如下: file_reader.py: with open('F:\python_stu\file.txt') as file_obj: contents = file_obj.read(); print(contents.rstrip()); (2)、运行后报错:Python OSError: [Errno 22] Invalid a…
2022年2月11日

Python: xlrd.biffh.XLRDError: Excel xlsx file; not supported

安装配置Python环境,突然跑着好好的一个脚本就跑不起来了。 workbook = xlrd.open_workbook(bom_path) File "C:\Python27\lib\site-packages\xlrd\__init__.py", line 170, in open_workbook raise XLRDError(FILE_FORMAT_DESCRIPTIONS[file_format]+'; not supported') xlrd.biffh.XLRDError: Excel xlsx file; not supported 可我自己却好好的,想不通,最后通过pip list检查了一下自己安装的库版本,找到了不同的地方。 我的电脑xlrd版本是1.2.0,给同事他们下载的是新的2.0.1,可能是是版本不兼容导致这个问题 Inst…