简体   繁体   English

如何在 conda 中安装包的扩展?

[英]How can I install an extension of a package in conda?

I am on my working Computer, so I do not have the admin rights to install things, which make package Installation quite tricky.我在我的工作计算机上,所以我没有安装东西的管理员权限,这使得包安装非常棘手。 I am using Anaconda prompt/ Conda for installing my packages: de_core_news_sm or any other German Extension as I will work in German language我正在使用 Anaconda prompt/Conda 来安装我的软件包:de_core_news_sm 或任何其他德语扩展,因为我将使用德语

I already successfully ran in my own environment and conda prompt:我已经在我自己的环境和 conda 提示中成功运行了:

activate MyEnv
pip install spacy

Now I am searching for a command similar to:现在我正在搜索类似于以下内容的命令:

python -m spacy download de_core_news_sm

But if I run this, I get an error:但是如果我运行这个,我会得到一个错误:

Python: cannot open file 'spacy': no file or such dictionary Python:无法打开文件“spacy”:没有文件或这样的字典

I also tried directly from conda with:我也直接从 conda 尝试过:

conda install -c conda-forge spacy-model-de_core_news_sm

which throws an error that I cannot use Python 3.6 for it, but I assume the newest Spacy is available for Python 3.6 or not?这引发了一个错误,我不能使用 Python 3.6,但我认为最新的 Spacy 是否可用于 Python 3.6?

My personalized environment was set up in the .condarc with the following scheme: https://support.anaconda.com/customer/en/portal/articles/2921276-using-anaconda-behind-a-firewall-or-proxy我的个性化环境是在 .condarc 中使用以下方案设置的: https : //support.anaconda.com/customer/en/portal/articles/2921276-using-anaconda-behind-a-firewall-or-proxy

You can try installing spacy in your Conda env through您可以尝试通过在您的 Conda 环境中安装 spacy

conda install -c spacy spacy

and then try然后尝试

python -m spacy download de_core_news_sm

您需要使用带有此 python 命令的-m调用 spacy 模块

python -m spacy download de_core_news_sm

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM