Python 如何在 conda 环境中安装 Selenium?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/46137219/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to install Selenium in a conda environment?
提问by Robert
I'm trying to install Selenium in a conda environment in Windows 10 with
我正在尝试在 Windows 10 的 conda 环境中安装 Selenium
conda install --name myenv selenium
but this returns the error
但这会返回错误
PackageNotFoundError: Package missing in current win-64 channels:
- selenium
How can I complete this package installation?
我怎样才能完成这个包安装?
回答by Tarun Lalwani
Conda uses different channels to search for packages. You need find the package which supports Win 64
Conda 使用不同的渠道来搜索包裹。您需要找到支持 Win 64 的软件包
You can do that by going to below link
你可以通过下面的链接来做到这一点
https://anaconda.org/search?q=selenium&sort=ndownloads&sort_order=-1&reverse=true
https://anaconda.org/search?q=selenium&sort=ndownloads&sort_order=-1&reverse=true
And you will find that this is most downloaded one
你会发现这是下载次数最多的一个
https://anaconda.org/conda-forge/selenium
https://anaconda.org/conda-forge/selenium
So execute below
所以在下面执行
conda install -c conda-forge --name myenv selenium
回答by venkateshvaran
If you are using Anaconda just use:
如果您使用的是 Anaconda,请使用:
- go to anaconda command prompt
- just type
pip install selenium
- 转到 anaconda 命令提示符
- 只需输入
pip install selenium