简体   繁体   English

python:使用conda安装破折号

[英]python: install dash with conda

How can I install dash step-by-step?如何逐步安装dash I'm really new at importing packages in python.我真的很擅长在 python 中导入包。 I have python 3.6.4 on my computer and I'm trying to install the dash package, dash_core_components .我的计算机上有 python 3.6.4,我正在尝试安装 dash 包dash_core_components

I tried to type in the anaconda prompt: conda install dash (not available for current channels) I also tried to install pip through conda: conda install pip then pip install dash ... but got an error also.我尝试输入 anaconda 提示符: conda install dash (不适用于当前频道)我也尝试通过conda install pipconda install pip然后pip install dash ...但也出现错误。

I'm really new and honestly don't really know what I'm doing.我真的很新,老实说,我真的不知道我在做什么。 I got a pop-up from spyder when I open it saying to never use pip, it can break stuff.当我打开 spyder 时,我收到一个弹出窗口,说永远不要使用 pip,它会破坏东西。 I don't understand why.我不明白为什么。

Here are the commands to get conda to install dash:以下是让 conda 安装 dash 的命令:

conda install -c conda-forge dash-renderer
conda install -c conda-forge dash 
conda install -c conda-forge dash-html-components 
conda install -c conda-forge dash-core-components
conda install -c conda-forge plotly

If you go to the Anaconda site and search for the package they will give you the conda command to install the package.如果您转到Anaconda 站点并搜索该软件包,他们将为您提供 conda 命令来安装该软件包。

Along with the others.与其他人一起。 You can also try the following:您还可以尝试以下操作:

import pip

pip.main(['install', 'dash-renderer', '--user'])
pip.main(['install', 'dash', '--user'])
pip.main(['install', 'dash-html-components', '--user'])
pip.main(['install', 'dash-core-components', '--user'])
pip.main(['install', 'plotly', '--user'])

Note: This will install the packages only for the current session.注意:这将仅为当前会话安装软件包。

or

Try the following too:也请尝试以下操作:

!pip install dash-renderer
!pip install dash
!pip install dash-html-components
!pip install dash-core-components
!pip install plotly

Per most recent update from Dash website, the below should now be sufficient:根据Dash网站的最新更新,以下内容现在应该足够了:

 pip install dash==1.8.0

Note: starting with dash 0.37.0, dash automatically installs dash-renderer, dash-core-components, dash-html-components, and dash-table, using known-compatible versions of each.注意:从 dash 0.37.0 开始,dash 会使用每个的已知兼容版本自动安装 dash-renderer、dash-core-components、dash-html-components 和 dash-table。 You need not and should not install these separately any longer, only dash itself.您不需要也不应该再单独安装它们,只需自行安装即可。

Per Lucas's comment above, with Anaconda distribution use :根据上面卢卡斯的评论,使用Anaconda发行版使用:

conda install -c conda-forge dash

Try one of the following:尝试以下方法之一:

conda install -c conda-forge dash
conda install -c conda-forge/label/broken dash

It worked for me for a different package (opencv).它对我来说适用于不同的包(opencv)。 Source at this link from anaconda.org来自 anaconda.org 的链接的来源

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

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