简体   繁体   English

如何将软件包安装到Anaconda中?

[英]How do I go about installing packages into Anaconda?

I've been looking everywhere and cannot find a robust explanation. 我到处都是,找不到一个有力的解释。

I'm brand new to Python, coming from R. I had no issues installing packages there but I'm finding it to be rather confusing in Python. 我是Python的新手,来自R。在那儿安装软件包没有问题,但是我发现它在Python中相当混乱。

So, I'm using Anaconda and I want to install this package into Python. 因此,我正在使用Anaconda,并且希望将此软件包安装到Python中。 It mentions using the conda install -c https://conda.anaconda.org/amueller wordcloud command but I have no idea where I'm supposed to run it. 它提到使用conda install -c https://conda.anaconda.org/amueller wordcloud命令,但是我不知道应该在哪里运行它。

Any advice would be much appreciated. 任何建议将不胜感激。

Run it from command line. 从命令行运行它。 You can directly install using pip as mentioned in the link. 您可以按照链接中所述使用pip直接安装。 Don't forget to install the pre-requisite packages. 不要忘记安装必备软件包。

pip install wordcloud

If you are using windows, make sure your environmental path is set so that you can use the pip command directly from windows command prompt. 如果使用的是Windows,请确保已设置环境路径,以便可以直接在Windows命令提示符下使用pip命令。 Usually the environmental variable is updated when you install Anaconda distribution. 通常,在安装Anaconda发行版时会更新环境变量。

Conda is just another command which you can use to install packages. Conda只是另一个可用于安装软件包的命令。 Procedure is exactly the same. 程序完全相同。

If you can't find a package with a simple conda search from the command line, run a search on the Anaconda website . 如果您无法从命令行通过简单的conda search找到软件包,请在Anaconda网站上运行搜索。

In your case, you'll find that the contributor amueller has his own channel and the package wordcloud is available . 在您的情况下,您会发现贡献者amueller具有自己的频道,并且软件包wordcloud 可用

Just run conda install -c amueller wordcloud=1.2.1 to install it. 只需运行conda install -c amueller wordcloud=1.2.1即可安装它。

You might want to create a separate environment using conda create first. 您可能想先使用conda create创建一个单独的环境。

您可以从Interface Interface安装软件包

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

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