【问题标题】:Running jupyter notebook with Keras on a virtual machine from Pycharm在 Pycharm 的虚拟机上使用 Keras 运行 jupyter notebook
【发布时间】:2019-05-19 02:24:36
【问题描述】:

在 pycharm 中运行 .ipynb 并在显示 Please, enter your Jupyter Notebook URL and authentication token 的弹出窗口上单击取消 -> 单击 Cannot connect to Jupyter Notebook 旁边的运行 Jupyter Notebook 并复制并粘贴 To access the notebook, open this file in a browser:.... Or copy and paste one of these URLs: 下的 url

我跟着these instructions在我的虚拟机中运行了python设置。

在此之后,在安装包括 Scipy 在内的所有模块后,我在训练 Keras 模块时收到此错误

ImportError: No module named scipy

该模块已安装。

之后

pip install --upgrade --force-reinstall scipy

【问题讨论】:

    标签: python keras pycharm jupyter-notebook


    【解决方案1】:

    尝试强制重新安装 scipy 后

    pip install --upgrade --force-reinstall scipy
    

    我注意到从错误的路径读取了一些 python 文件。

    解决方案包括关闭 Pycharm,然后重新打开它。然后当再次运行 .ipynb 文件时,我必须将 Python 解释器和 Project 设置为正确的。 (untitled是项目的名字,Python 3.6(untitled)是venv的名字)

    Project 之前设置为 usernamePython Interpreter 之前设置为 python /user/bin/python。

    Project 之前设置为 username(主目录),Python Interpreter 之前设置为 /user/bin/python 中的 python。因为项目被设置为用户名,我相信一些 scipy 文件是从主目录中读取的。我不知道为什么会这样。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-07-06
      • 2018-09-21
      • 2018-04-06
      • 1970-01-01
      • 2016-12-12
      • 1970-01-01
      • 2017-01-21
      相关资源
      最近更新 更多