![](https://img-blog.csdnimg.cn/5841468f17014692be2132dce468d8d1.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
报错
该专栏主要记录平时跑程序,出现的一些错误及其解决办法。
薰珞婷紫小亭子
这个作者很懒,什么都没留下…
展开
-
AttributeError: ‘ChatGLMTokenizer‘ object has no attribute ‘sp_tokenizer‘
再结合自己原本的虚拟环境中有trl和vllm,也对transformers有一定的限定,因此安装transformers 4.33.1解决该问题。如果没有trl和vllm的限制,只需要安装transformers<4.34即可。在使用ChatGLM+lora微调的时候,报错“AttributeError: 'ChatGLMTokenizer' object has no attribute 'sp_tokenizer'“导致该问题的主要原因是transformers版本的问题。原创 2024-03-07 20:00:03 · 2070 阅读 · 1 评论 -
如何解决docker中出现的“bash: vim: command not found”
在docker中,想要执行vim编辑文件,弹出“docker bash: vim: command not found“(如下图),请问该如何解决?再执行vim命令,便不会报错。原创 2023-08-14 21:37:15 · 650 阅读 · 0 评论 -
运行报错:“RuntimeError: “host_softmax“ not implemented for ‘Long‘”
RuntimeError: "host_softmax" not implemented for 'Long'原创 2023-03-13 20:52:12 · 3182 阅读 · 0 评论 -
Latex中,边界越界怎样处理?
Latex中,边界越界怎样处理?原创 2022-12-30 18:33:31 · 5988 阅读 · 1 评论 -
报错:“[Thread-0] INFO CoreNLP - CoreNLP Server is shutting down.”
[Thread-0] INFO CoreNLP - CoreNLP Server is shutting down.原创 2022-11-28 11:40:12 · 305 阅读 · 0 评论 -
报错“ModuleNotFoundError: No module named sklearn”
报错“ModuleNotFoundError: No module named sklearn”原创 2022-11-25 17:13:21 · 2394 阅读 · 0 评论 -
linux安装java,配置环境之后,输入命令报错bash:vi:command not found
linux安装java,配置环境之后,输入命令报错bash:vi:command not found原创 2022-11-23 20:42:34 · 2331 阅读 · 0 评论 -
RuntimeError: Attempting to deserialize object on CUDA device 3 but torch.cuda.device_count() is 1.
RuntimeError: Attempting to deserialize object on CUDA device 3 but torch.cuda.device_count() is 1.原创 2022-11-19 20:41:43 · 1847 阅读 · 0 评论 -
服务器kill掉的进程为什么还占内存
服务器kill掉的进程为什么还占内存原创 2022-11-17 23:59:37 · 1747 阅读 · 0 评论 -
运行.pynb程序报错“TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See
在运行.ipynb文件的时候出现报错“TqdmWarning: IProgress not found. Please update jupyter and ipywidgets.”原创 2022-11-16 10:40:56 · 2664 阅读 · 0 评论 -
vscode连接服务器,代码运行的是修改之前的程序
vscode连接服务器,代码修改后保存,但运行的是修改之前的程序原创 2022-11-09 12:51:05 · 1842 阅读 · 0 评论 -
pytorch 如何安装torchcrf 而不是TorchCRF
from torchcrf import CRF原创 2022-09-15 15:22:17 · 2879 阅读 · 0 评论 -
删除文件夹时,报错“错误ox80070091:目录不是空的”,该如何解决?
错误ox80070091:目录不是空的原创 2022-08-01 15:35:02 · 13983 阅读 · 12 评论 -
代理服务器拒绝连接
代理服务器拒绝连接原创 2022-07-12 23:52:25 · 22287 阅读 · 4 评论 -
linux 报错:“Host key verification failed.”
Host key verification failed.原创 2022-07-08 09:33:41 · 422 阅读 · 0 评论 -
pandas.errors.ParserError: Error tokenizing data. C error: Expected 1 fields in line 5, saw 3
报错原创 2022-06-22 22:37:10 · 1938 阅读 · 0 评论 -
UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figur
服务器可视化方法原创 2022-06-13 19:27:49 · 281 阅读 · 0 评论 -
Colab报错:ImportError: cannot import name ‘_check_savefig_extra_args‘ from ‘matplotlib.backend_bases‘
matplotlib原创 2022-06-10 16:15:11 · 3776 阅读 · 6 评论 -
LaText Error:Environment aligned undefined.
目录问题描述:问题解决:问题描述:使用在线的Overleaf编译论文,公式部分报错如下。问题解决:出现这种“Environment xxx undefined”的问题,大多是因为没有引入包,解决办法就是引入相应的包该错误的解决办法是导入amsmath包, 即在最前面导入包的地方,加入该行。\usepackage{amsmath}...原创 2022-04-08 23:17:06 · 2408 阅读 · 0 评论 -
git 长传文件报错“error: remote origin already exists.”
git 长传文件报错“error: remote origin already exists.”问题描述在将文件上传至github时候,报错“error: remote origin already exists.”解决办法执行下面的命令,删除origin,再次重新执行长传命令即可。git remote rm origin...原创 2022-02-18 15:13:09 · 207 阅读 · 0 评论 -
No model “pytorch_transformers“
No model “pytorch_transformers”一、问题描述在运行程序的时候,出现No model "pytorch_transformers"报错二、解决办法通过pip install pytorch_transformers -i https://pypi.douban.com/simple命令,安装即可。不太推荐使用pip install pytorch_transformers命令安装,因为会报错...原创 2021-12-26 15:28:12 · 2259 阅读 · 3 评论 -
服务器运行程序一直不能上GPU,一直在CPU上跑的原因
服务器运行程序一直不能上GPU,一直在CPU上跑的原因一、问题描述网上找的别人的开源代码,通过配置参数可以实现程序成功运行,但是运行速度很慢,通过gpustat命令查看,发现一直都是在cpu上运行,可程序中,明明写了device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")二、解决方法1 . 通过将原程序中的device = torch.device("cuda:0" if torch.cuda.is_availab原创 2021-12-25 20:19:01 · 8203 阅读 · 1 评论 -
NotADirectoryError: `logs` is not exist.
NotADirectoryError: logs is not exist.一、问题描述在运行别人的程序的时候,报错如下:二、解决办法看报错信息:“NotADirectoryError: logs is not exist.”,发现是缺少logs文件。原来是因为作者在程序中写了fitlog,所以,只需要初始化下即可。输入命令:fitlog init ....原创 2021-12-25 18:36:14 · 722 阅读 · 1 评论 -
Vs code怎样查看pdf文件
Vs code怎样查看pdf文件问题描述原始的VSCODE软件,在打开.pdf文件的时候,是一堆乱码解决办法安装vscode-pdf插件操作步骤打开vscode软件在左侧找到扩展在搜索框中,输入pdf,找到“vscode-pdf”vscode-pdf 界面打开,安装install即可。安装成功之后,再次打开,就能看到pdf文件了...原创 2021-12-10 16:18:49 · 2785 阅读 · 0 评论 -
python 运行画图时,报错:“RuntimeError: Invalid DISPLAY variable“
python 运行画图时,报错:“RuntimeError: Invalid DISPLAY variable“错误描述错误原因matplotlib的默认backend是TkAgg,而FltAgg、GTK、GTKCairo、TkAgg、Wx和WxAgg这几个backend都要求有GUI图形界面,所以在ssh操作的时候会报错。解决办法在导入matplotlib的时候指定不需要GUI的backend(Agg、Cairo、PS、PDF和SVG)。例如:import matplotlib.pyplo原创 2021-12-10 16:10:29 · 803 阅读 · 0 评论 -
NotImplementedError: Cannot convert a symbolic Tensor (strided_slice_1:0) to a numpy array.
NotImplementedError: Cannot convert a symbolic Tensor (strided_slice_1:0) to a numpy array.问题描述:在运行程序的时候,报错“NotImplementedError: Cannot convert a symbolic Tensor (strided_slice_1:0) to a numpy array.”。为了节约程序的运行时间,我将某一服务器上的程序拷贝至另一个服务器运行,结果发现报错。检查了tensor原创 2021-12-03 16:20:07 · 3307 阅读 · 0 评论 -
ERROR: Cannot uninstall ‘PyYAML‘. It is a distutils installed project and thus we cannot accurately
ERROR: Cannot uninstall ‘PyYAML’. 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.问题描述:在安装transformers的时候,报错“ERROR: Cannot uninstall ‘PyYAML’. It is a distu原创 2021-12-03 15:44:44 · 3786 阅读 · 2 评论 -
ERROR: Cannot uninstall ‘wrapt‘. It is a distutils installed project and thus we cannot accurately d
ERROR: Cannot uninstall ‘wrapt’. 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.问题描述:安装tensorflow的时候,报错“ERROR: Cannot uninstall ‘wrapt’. It is a distutils原创 2021-12-03 15:34:05 · 1802 阅读 · 0 评论 -
bash: gpustat: command not found...
bash: gpustat: command not found…问题描述:问题解决:安装即可pip install gpustat原创 2021-11-30 13:03:26 · 1996 阅读 · 0 评论 -
报错:tensorflow.python.framework.errors_impl.ResourceExhaustedError: OOM when allocating tensor with
tensorflow.python.framework.errors_impl.ResourceExhaustedError: OOM when allocating tensor with shape[30522,768] and type float on /job:localhost/replica:0/task:0/device:GPU:0 by allocator GPU_0_bfc [Op:TruncatedNormal]run failed问题描述:报错界面如下:解决办法:tenso原创 2021-11-30 12:48:23 · 2144 阅读 · 0 评论 -
nvcc -V查看cuda版本不一致的问题 source ~/.profile
nvcc -V查看cuda版本不一致的问题问题描述:如下图红色和蓝色处所示,两次nvcc -V 看到的cuda版本不一致。cuda10.1是新配置的cuda 版本,但是maybe是配置cuda的过程中,环境没有设置好,导致需要手动source ~/.profile 刷新,才能进入当前的real cuda版本...原创 2021-11-30 11:01:14 · 519 阅读 · 0 评论 -
非root用户在服务器上安装CUDA和cudnn到指定目录
非root用户在服务器上安装CUDA和cudnn到指定目录参考网址,亲测有效Click Here原创 2021-11-30 09:50:38 · 489 阅读 · 0 评论 -
解决linux运行程序,安装模块没网的问题
解决linux运行程序,安装模块没网的问题问题描述:在安装模块的时候,出现没网络,如下图所示:解决办法:使用网关登陆: curl 'http://10.9.1.3' --data "DDDDD=这个地方填学校上网的用户名&upass=这个地方填学校上网的密码&0MKKey="注意:每需要安装一次,就需要执行一次该命令...原创 2021-11-27 14:39:12 · 1278 阅读 · 0 评论 -
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host=‘files.pythonhosted.org‘,
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host=‘files.pythonhosted.org’, port=443): Read timed out.问题描述在用pip命令,安装模块(eg: tensorflow)的时候,出现如下界面的错误:![](https://img-blog.csdnimg.cn/9ef2325c0c6b4ee78b353ea59dc3a127.png?x-oss-proces原创 2021-11-27 14:34:19 · 763 阅读 · 0 评论 -
ImportError: cannot import name ‘TFBertModel‘
ImportError: cannot import name ‘TFBertModel’将tensorflow更换成2.4.1即可。原创 2021-11-27 14:26:12 · 402 阅读 · 0 评论 -
shell 报错:command not found,或换行符无效
shell 报错:command not found,或换行符无效一、问题描述在用.sh命令执行文件的时候,发现,读取不到内容,或者报错“command not found”。二、错误原因出现该问题的原因是,因为.sh文件中,出现了CR LF字符,CR LF是Windows中的换行符,linux中的换行符是LF三、解决方案1.错误解决方案最初的解决方案是将.sh文件的内容,拷贝至notepad++软件,通过下图的操作,显示.sh的符号,从图可以看到原始的.sh文件中,存在CR LF最“想原创 2021-11-26 10:49:01 · 7072 阅读 · 0 评论 -
absl.flags._exceptions.IllegalFlagValueError: flag --vocab_file=None: Flag --vocab_file must have a
absl.flags._exceptions.IllegalFlagValueError: flag --vocab_file=None: Flag --vocab_file must have a value other than None.运行.sh文件, 程序报错如下:.sh文件内容解决办法:检查.sh文件中,在循环体中是否出现不该出现的东西,如:上图中,第16行代码中,"/"后面出现一个空格,导致程序 出错。删除多余空格即可解决问题新代码注意事项:for 循环体中,不能出现注释等原创 2021-11-21 21:59:25 · 1409 阅读 · 0 评论 -
ERROR: Could not find a version that satisfies the requirement tensorfolw==1.14
ERROR: Could not find a version that satisfies the requirement tensorfolw==1.14在配置完linux环境之后,在安装tensorflow的时候出现报错“ERROR: Could not find a version that satisfies the requirement tensorfolw==1.14” (因为程序需要低版本的tensorflow1.14.0)错误查看原因,发现是因为安装的acaconda版本过高,导原创 2021-11-09 20:23:53 · 6537 阅读 · 0 评论 -
程序报错:OSError: [E050] Can‘t find model ‘en_core_web_sm‘. It doesn‘t seem to be a Python package or a
OSError: [E050] Can’t find model ‘en_core_web_sm’. It doesn’t seem to be a Python package or a valid path to a data directory.在使用spacy进行语义分析时,一直出现加载包不成功的例子,会报以上错误。解决办法执行命令,即可conda install -c conda-forge spacy-model-en_core_web_sm...原创 2021-10-10 21:10:12 · 2482 阅读 · 2 评论 -
#Tensorflow Process finished with exit code 3#
Tensorflow 报错 Process finished with exit code 3Process finished with exit code 3最近在跟着B站视频学习Tensorflow框架,在学习到CNN的时候,跟着视频写的程序,出错,显示“Process finished with exit code 3”,网上百度,答案也很少。后来自己仔细查找了下原因,发现出现“Pro...原创 2019-06-17 21:45:56 · 3290 阅读 · 1 评论