如何解决如何查找在pickle文件中使用的Spacy和python版本?
我想打开几个月前转储的以下pickle文件,但出现以下错误。
dataset_s = pickle.load(open("dataset_s.pickle",'rb'))
AttributeError: Can't get attribute 'cluster' on <module 'spacy.lang.lex_attrs' from ...
此外,当我想import
使用的软件包时,会收到以下警告。
DeprecationWarning: `should_run_async` will not call `transform_cell` automatically in
the future. Please pass the result to `transformed_cell` argument and any exception
that happen during thetransform in `preprocessing_exc_tuple` in IPython 7.17
and above,and should_run_async(code)
有人可以帮助我解决这些问题吗?
解决方法
如果要从Github获取此文件,则很可能他们有一个名为requirements.txt
的文件,其中描述了软件包的版本要求。
根据您所使用的环境,甚至可以使用不同的方法来设置环境,以根据requirements.txt
自动更新/反向:
警告不会影响您当前的运行,但是最好根据您的要求更改代码以使其与软件包的将来版本兼容。或者,您也可以保存版本信息,以备将来使用。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。