python
Pchoy
NLP算法工程师,知识图谱与智能问答方向。
展开
-
Tensorflow | FailedPreconditionError错误
错误日志:tensorflow.python.framework.errors_impl.FailedPreconditionError: 2 root error(s) found. (0) Failed precondition: Error while reading resource variable crf_1/left_boundary from Container: localhost. This could mean that the variable was uninitialize原创 2020-07-07 14:57:02 · 4600 阅读 · 3 评论 -
linux | 添加python模块搜索路径(以text_classification为例)
情况说明这是我的目录结构,我在triple_extract下的triple_extractor调用text_classification下的某模块时提示无法调用,我已经添加了init,py文件,但仍然不行解决方案:添加将本项目添加到python 的搜索路径下即可。1、查看python 模块默认安装路径import sysprint sys.path找到当前环境下的site-packages在哪里然后在该目录下增加.pth文件,(名字随意)cd /usr/local/anaconda原创 2020-07-07 13:34:18 · 1262 阅读 · 0 评论 -
python安装库的时候Command “python setup.py egg_info“ failed with error code 1 in /tmp/pip-build*
1、错误描述pip安装软件时出现:Command “python setup.py egg_info” failed with error code 1 in /tmp/pip-build-*(其中×与要安装的软件有关)distutils.errors.DistutilsError: Command ‘[’/usr/local/anaconda3/envs/tf14/bin/python’, ‘-m’, ‘pip’, ‘–disable-pip-version-check’, ‘wheel’, ‘–no原创 2020-07-02 09:55:31 · 1143 阅读 · 0 评论 -
linux | 修改pip源为国内源
1、临时修改在安装命令后加上指定源选项pip install pymysql -i https://mirrors.aliyun.com/pypi/simple/2、永久修改2.1 首先创建文件夹~/.pip mkdir ~/.pip2.2 然后修改该文件vim ~/.pip/pip.conf1 [global]2 timeout = 83 index-url = http://mirrors.aliyun.com/pypi/simple/4 extra-index-url=原创 2020-07-01 21:57:34 · 4278 阅读 · 0 评论 -
jupyterlab相关
1、下载jupyterlabpip install jupyterlab2.1配置jupyter_notebook_config.py#生成配置文件jupyter notebook --generate-configWriting default config to: /home/pchoy/.jupyter/jupyter_notebook_config.py2.2 修改配置文件1)创建一个访问密码,后面需要、通过网页登陆时也需要jupyter notebook passwordE原创 2020-06-04 23:24:18 · 206 阅读 · 0 评论 -
dict使用指南
一键多值#dict一键多值for i in range(len(one)): temp.setdefault(one[i],[]).append(two[i])原创 2020-05-28 12:08:03 · 318 阅读 · 0 评论