0

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

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

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

from image_registration import chi2_shift

from image_registration.fft_tools import shift
4

2 回答 2

0

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

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

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

于 2019-04-26T05:56:38.433 回答
0

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

于 2019-04-27T07:04:55.143 回答