Python
我是_程序员
这个作者很懒,什么都没留下…
展开
-
Java spring boot 项目和python flask项目 开启 https 请求
Java spring boot 项目和python flask项目 开启 https 请求原创 2022-10-20 10:56:54 · 1013 阅读 · 1 评论 -
词性标注英文简称及分类
标注词表:名词:NN,NNS,NNP,NNPS代词:PRP,PRP$形容词:JJ,JJR,JJS数词:CD动词:VB,VBD,VBG,VBN,VBP,VBZ副词:RB,RBR,RBS1. CC Coordinating conjunction 连接词2. CD Cardinal number 基数词3. DT Determiner限定词(如this,that,these,those,such,不定限定词:no,some,an...转载 2020-07-13 10:11:17 · 8907 阅读 · 0 评论 -
UnicodeEncodeError: ascii
解决方法:1、运行程序时加上 PYTHONIOENCODING,如下PYTHONIOENCODING=utf-8 python app_run.py &2、重新定义输出标准import codecssys.stdout = codecs.getwriter("utf-8")(sys.stdout.detach())sys.stdout.write("Your content....")原创 2020-06-29 15:21:12 · 2276 阅读 · 0 评论 -
Python TensorFlow 实现多元线性回归算法
# encoding = utf-8import tensorflow as tfimport numpy as npimport matplotlib.pyplot as plt# 加载数据def load_data(path): with open(path, "r", encoding="utf-8") as f: lines = f.readlines() x_data = [] y_data = [] for l.原创 2020-06-08 17:36:26 · 745 阅读 · 2 评论 -
Python运行requirements.txt 文件安装包
# 从requirements.txt安装依赖pip install -r requirements.txt -ihttps://pypi.tuna.tsinghua.edu.cn/simple加上后面的 -ihttps://pypi.tuna.tsinghua.edu.cn/simple可以很快就下载完了requirements.txt文件格式jieba >= 0.39nltk >= 3.2.3numpy >= 1.12.1coverage >...原创 2020-06-03 10:27:32 · 4538 阅读 · 0 评论 -
pip install 包名 下载太慢解决方案
选择国内的下载源就好了,如下pip install -i https://pypi.tuna.tsinghua.edu.cn/simple jieba其他下载源:清华:https://pypi.tuna.tsinghua.edu.cn/simple阿里云:http://mirrors.aliyun.com/pypi/simple/中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/华中理工大学:http://pypi.hustunique.c.原创 2020-06-03 10:23:29 · 146 阅读 · 0 评论 -
ModuleNotFoundError: No module named 'win32api'
问题描述:Pycharm运行py项目时报:ModuleNotFoundError: No module named 'win32api'解决方案:方案1:下载地址:https://pypi.org/project/pypiwin32/#files使用cmd命令打开windows的命令行窗口,执行命令:python -m pip install D:\SoftWare\Py...原创 2019-01-31 14:17:03 · 414 阅读 · 1 评论 -
Python安装scrapy失败解决方法
问题描述:pip install scrapy 命令安装scrapy显示错误如下:解决方案:1.首先确定你电脑上安装的python 是32位的还是64位的,我这里安装的是64位的2.然后到 http://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted 下载twisted对应版本的whl文件我下载的版本是Twisted-18.9.0-cp...转载 2019-01-31 11:08:32 · 1115 阅读 · 0 评论