自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(8)
  • 收藏
  • 关注

转载 python3 出现print输出的中文乱码问题解决

问题就是图片所示。就这个破问题 弄了好久。首先以为是python3的问题, 但是python3的默认编码就是utf8,然后查看sys.getdefaultencoding。也是utf8。 这些看上去都没有问题。 然后就找了大半个网络。不得不说网络这个东西害死人,一群只会复制粘贴的瓜皮儿。 没一点有用的答案,还要写的像模像样装x最后想到可能是print函数输出编码问题, 然后就写...

2019-10-23 14:02:07 4257 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 2875

原创 解决导入matplotlib的RuntimeError: Python is not installed as a framework.

import matplotlibmatplotlib.use('TkAgg')import matplotlib.pyplot as plt

2018-04-05 22:48:12 1601

原创 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 2148

原创 用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 4921 5

转载 使用virtualenv配置Python开发环境

http://docs.python-guide.org/en/latest/dev/virtualenvs/

2018-03-01 10:19:03 161

转载 Sublime Text 3 配置python开发环境

https://stackoverflow.com/questions/23257984/python3-4-on-sublime-text-3

2018-03-01 09:51:56 413

原创 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 21665 2

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除