error: command 'C:\\Users\\Admin\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\cl.exe' failed with exit status 2 系统 windows 2003 python2.7 玩了个小项目,需要用到lxml, pip install lxml 常规安装,出现错误,要求c++ 9.0,还给了个下载地址,安装好再来,出现上面错…
python读写文件的api都很简单,一不留神就容易踩"坑".笔者记录一次踩坑历程,并且给了一些总结,希望到大家在使用python的过程之中,能够避免一些可能产生隐患的代码. 1.read()与readlines(): 随手搜索python读写文件的教程,很经常看到read()与readlines()这对函数.所以我们会常常看到如下代码: with open(file_path, 'rb') as f: sha1Obj.update(f.read()) or with open(fil…