【问题标题】:How do you install a module in spyder anaconda?如何在 spyder anaconda 中安装模块?
【发布时间】:2019-04-24 14:46:03
【问题描述】:

我正在尝试在 Spyder Anaconda 中运行一些代码。我认为它就像在代码中看到的那样简单地导入它,但我收到一条错误消息:

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

我知道这意味着 image_registration 不包含在 Spyder 已有的内容中,但我不知道如何添加它。

from image_registration import chi2_shift

from image_registration.fft_tools import shift

【问题讨论】:

  • 您使用的是哪个操作系统?

标签: module image-registration


【解决方案1】:

将您的 Anaconda 脚本路径(默认=C:\Users\userna**\Anaconda3\Scripts)添加到环境变量并打开命令提示符并键入 pip.exe install module_name在你的情况下 pip.exe 安装 image_registration To install module image Registration

【讨论】:

    【解决方案2】:

    请在 anaconda 提示符中尝试以下步骤

    1. conda create -n myenv
    2. activate myenv
    3. pip install image_registration
    4. conda install spyder
    5. spyder
    

    如果您已经在某个环境中安装了 image_registration 包,您可以激活该环境并尝试从激活的环境中打开 spyder。

    【讨论】:

      猜你喜欢
      • 2019-02-19
      • 2021-05-30
      • 2020-11-19
      • 2021-07-25
      • 2021-11-04
      • 2017-05-31
      • 2021-04-12
      • 2017-02-20
      • 1970-01-01
      相关资源
      最近更新 更多