0
推荐
689
阅读
解决python的print不能马上看到输出
因为python的输出有缓冲:1. print命令加个参数,flush=Trueprint(x, flush=True)2. nohup.log不能够马上看到输出,给 python 加个-u参数,使得python不启用缓冲:nohup python -u test.py > nohup.log 2>&1 &
0
推荐
953
阅读
jupyter 启动自定义目录
1. 配置jupyter notebook --generate-config
生成
C:\Users\apple\.jupyter\jupyter_notebook_config.py
改
c.NotebookApp.notebook_dir = 'E:/work'2. 快捷方式指定目标位置右键,删除 "%USERPROFILE%"目标位置修改为:E:/work
0
推荐
1903
阅读
pytesseract安装,中文识别OCR
网上搜一堆解决问题的文章都没用1. 安装 pytesseractpip install pytesseract跑python识别程序,下列语句会报错pytesseract.image_to_string(Image.open(filename))报错:Error opening data file /usr/local/share/tessdata/eng.traineddata Please make sure the TESSDATA_PREFIX environment variable is set to your...
0
推荐
1245
阅读
UltraEdit打开文件的编码显示
一般Unicode指UTF-16打开UTF-8,用UFT-16编辑,保存还是UTF-8状态:ASCII 编码文件显示 DOS或UNIXUTF-8 编码文件显示为 U8-DOS或U8-UNIXUTF-16编码文件显示为 U-DOS 或U-UNIX原文:https://blog.csdn.net/u011519892/article/details/17419701关于Unicode 编码,这里有篇文章 可以...
0
推荐
2261
阅读
python在windows上使用multiprocessing Pool要运行在if __name__=="__main__"
解释见 https://blog.csdn.net/qq_26442553/article/details/94595715原文如下:1.执行一个python的multiprocessing.Pool进程池程序,实现多进程程序,代码如下,结果在windows下执行报错,但是在linux和unix里面执行没有报错?from multiprocessing import Pool
import time ,os ,random
def worker(msg):
...
0
推荐
983
阅读
centos 安装opencv
pip install opencv-python --default-timeout 1000 -i https://pypi.mirrors.ustc.edu.cn/simple/
0
推荐
838
阅读
pip install 太慢
pip install numpy --default-timeout 1000 -i https://pypi.mirrors.ustc.edu.cn/simple/阿里云 http://mirrors.aliyun.com/pypi/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
豆瓣(douban) http://pypi.douban.com/simple/
清华大学 https://pypi.tuna.tsinghua.e...
0
推荐
799
阅读
0
推荐
2680
阅读
conda 安装 pytorch 下载太慢解决
改成中科大的源conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/free/
conda config --set show_channel_urls yes去掉 -c
# conda install pytorch=1.1.0 torchvision cudatoolkit=10.0 -c pytorch
conda install pytorch=1.1.0 torchvision cudatoolkit=10.0 pytorch清华源,但是不好使了conda...
0
推荐
1366
阅读
text2code安装
1. 下载安装git clone https://github.com/deepklarity/jupyter-text2code.git
cd jupyter-text2code
pip install .2. 打开jupyter notebookjupyter notebookIf installation happened successfully, then for the first time, Universal Sentence Encoder model will be downloaded from tensorflow_hub.3. 解决下...
0
推荐
1774
阅读
centos matplotlib 中文 显示方框
1. 下载 SimHei.ttfsudo wget https://github.com/StellarCN/scp_zh/raw/master/fonts/SimHei.ttf2. 安装中文字体SimHeisudo yum install fontconfig # 包含fc-list列举可用字体 fc-cache生成字体信息缓存
sudo yum install mkfontscale # 生成字体索引
sudo mkdir /usr/share/fonts/zh_CN # 建立放中文字...
0
推荐
776
阅读
python: import 文件
image-tsne.ipynb 引用 lookalike下的模块 extract_feats import sys
sys.path.append("/work/lookalike/") # 指定绝对路径,告诉extract_feats.py中的from extract_cnn_vgg16_keras 引入知道extract_cnn_vgg16_keras在哪里
sys.path.append("../") # 指定相对路径,告诉from lookalike引用,知道lookalike在哪里
f...
0
推荐
1231
阅读
proxy pool
1. git clone proxy_pool$ git clone git@github.com:jhao104/proxy_pool.git2. 解决github clone报错Conection refusedhttps://ask.hellobi.com/blog/safa/367753. 安装python3 的包$ env364
$ pip install -r requirements.txt4. 安装redis数据库$ sudo yum install epel-release # 添加epel库
$ sudo yum upda...
0
推荐
5680
阅读
安装 pyhive 出错 ModuleNotFoundError: No module named 'sasl'
yum install cyrus-sasl-lib.x86_64
yum install cyrus-sasl-devel.x86_64
yum install libgsasl-devel.x86_64
yum install saslwrapper-devel.x86_64
sudo pip install sasl
sudo pip install thrift_sasl
0
推荐
3982
阅读
ModuleNotFoundError: No module named 'fastai.callbacks' 报错
~/.pip/pip.conf[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple降级到 1.0版本pip install fastai==1.0.52