- 博客(8)
- 收藏
- 关注
转载 python3 出现print输出的中文乱码问题解决
问题就是图片所示。就这个破问题 弄了好久。首先以为是python3的问题, 但是python3的默认编码就是utf8,然后查看sys.getdefaultencoding。也是utf8。 这些看上去都没有问题。 然后就找了大半个网络。不得不说网络这个东西害死人,一群只会复制粘贴的瓜皮儿。 没一点有用的答案,还要写的像模像样装x最后想到可能是print函数输出编码问题, 然后就写...
2019-10-23 14:02:07 4289 4
原创 python 2 安装tensorflow解决Cannot uninstall 'six'
Cannot uninstall 'six'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.用sudo pip2 install -r requirem...
2018-06-07 14:39:29 2882
原创 解决导入matplotlib的RuntimeError: Python is not installed as a framework.
import matplotlibmatplotlib.use('TkAgg')import matplotlib.pyplot as plt
2018-04-05 22:48:12 1625
原创 python读取文件遇到错误:UnicodeDecodeError: 'ascii' codec can't decode...
with open(fileIn, 'r', encoding="utf-8") as f: data1 = f.readline()with open(fileOut,'w', encoding="utf-8") as f: f.write(data1)
2018-04-04 17:57:09 2158
原创 用python将base64转pdf
import base64base64String = "JVBERi0xLjQKJeHp69MKMSAwIG9iago8PC9Qcm9kdWNlciAoU2tpYS9..." # ""中为pdf的base64码with open('temp.pdf', 'wb') as f: f.write(base64.b64decode(base64String))
2018-03-20 13:50:31 5001 5
转载 使用virtualenv配置Python开发环境
http://docs.python-guide.org/en/latest/dev/virtualenvs/
2018-03-01 10:19:03 172
转载 Sublime Text 3 配置python开发环境
https://stackoverflow.com/questions/23257984/python3-4-on-sublime-text-3
2018-03-01 09:51:56 420
原创 Anaconda创建新环境,并在其中安装扩展包(以安装easydict包为例)
博主最近用到的一个项目需要用python 2的版本,并需要easydict扩展包。下面展示如何在anaconda中创建新环境并导入easydict扩展包。操作系统为mac。1. 安装anaconda 去官网下载安装即可。2. 创建新环境 打开anaconda navigator,选择左侧边栏的Environment,点击Create,选择Python 2.7并命名为python2。3....
2018-02-26 23:26:42 21713 2
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人