拥抱面变压器conda安装问题
默认情况下,conda安装变压器2.x但是,默认情况下,pip安装4.x,这是我想要的,但是通过conda。
如果我通过从Conda-Forge指定最新的分发文件来安装… conda安装https://anaconda.org/conda-forge/transformers/4.16.2/download/noarch/transformers-4.16.2-pyhd8ed1ab_0.tar.bz2
然后,它会抱怨环境并不一致,并列出引起问题的软件包,即Pytorch版本1.11。
我卸下了Pytorch,然后按照上面列出的安装安装,然后安装进行。然后,我尝试安装数据集… conda安装数据集
现在,它抱怨由于我安装了变压器4.16.2,环境是不一致的。
不确定有什么问题以及如何将Pytorch,Transformers和Dataset一起安装而没有任何问题。 我是否需要这些特定版本才能使其正常工作,找不到有关拥抱面文档或支持页面的任何此类准则。
谢谢。
conda by default installing transformers 2.x however pip installs 4.x by default which is what I want but via conda.
If I install by specifying the latest distribution file from conda-forge…conda install https://anaconda.org/conda-forge/transformers/4.16.2/download/noarch/transformers-4.16.2-pyhd8ed1ab_0.tar.bz2
then it complains that environment is not consistent and list the package causing the issue which is PyTorch version 1.11.
I removed pytorch and then installed as listed above then installation go through. I then tried installing datasets…conda install datasets
Now it complains that environment is inconsistent due to transformers 4.16.2 that I installed.
Not sure whats wrong and how to install pytorch, transformers and datasets together with no issue.
Do I need specific versions of these to make it work, could not find any such guideline on huggingface docs or support pages.
thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
刚刚尝试在
venv
中安装变压器,我将按照以下操作进行操作,并安装了版本
Transformers-4.18.0
。如果一个人想从频道
huggingface
专门安装,则执行以下最后一个情况,请使用
pip
进行安装,因为使用pip
可以潜在地破坏一个人的安装(pip
和conda
不要以相同的方式管理依赖关系)。或者,如果已经安装了
Transformers
,则通过指定版本或直接从源
指定版本,并希望安装与当前拥有的版本不同的版本,则应通过
-IV
。 (如下所示)检查是否正确安装了
transformers
预算的型号,然后打印出标签并得分。
有关
Transformers
安装的更多信息,请咨询此页面。Just tried installing transformers in the
venv
that I will be working on as followsAnd it installed the version
transformers-4.18.0
.If one wants to install specifically from the channel
huggingface
, then do the followingLast case scenario, install it with
pip
, as usingpip
can potentially wreck one's installation (pip
andconda
do not manage dependencies in the same way).Or, by specifying the version
Or directly from the source
If one has
transformers
already installed and wants to install a different version than the one we currently have, one should pass-Iv
(as suggested here)To check if
transformers
was properly installed, run the followingIt will download a pretrained model, then print out the label and score.
For more information on
transformers
installation, consult this page.对我有用的是从
conda-forge
频道而不是huggingface
频道下载,即conda 安装 conda-forge::transformers
What worked for me is to download from
conda-forge
channel instead ofhuggingface
channel, i.e.conda install conda-forge::transformers