【问题标题】:Jupyter Notebook In PythonPython 中的 Jupyter 笔记本
【发布时间】:2020-03-28 16:51:37
【问题描述】:

我在我的系统中安装了两个版本的 python,例如 python 3.6 和 python 3。 我正在 PyCharm 中运行一个程序,该程序运行良好,而同一脚本未在 Jupyter Notebook 中运行。显示的错误:

ModuleNotFoundError: 没有名为“selenium”的模块

我使用 anaconda 安装了 jupyter。 以下是我的问题:

  1. 如何为同一个脚本运行 jupyter notebook?
  2. 我的笔记本没有指向我在 PyCharm 中运行的同一 python 版本吗? 如果是这样,如何将其更改为适当的 python 版本?
from selenium import webdriver
driver = webdriver.Chrome(r'C:\Users\Admin\Desktop\sriyam\chromedriver.exe')
driver.get('https://python.org')

【问题讨论】:

  • 你是如何安装 selenium 的?如果在 PyCharm 中发生此错误,请转到设置 > 项目解释器,然后选择安装了 selenium 的解释器。

标签: python jupyter-notebook


【解决方案1】:

你安装硒了吗

安装它

试试

conda install -c conda-forge selenium 

如果错误再次弹出 试试这个

pip install selenium

注意:-从 conda 提示符安装它 希望对你有帮助

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-12-31
    • 2021-02-01
    • 1970-01-01
    • 2017-10-10
    • 1970-01-01
    相关资源
    最近更新 更多