【发布时间】:2019-04-02 12:45:21
【问题描述】:
我在 Anaconda3 中创建了一个环境,并在 Linux 机器上安装了 pytorch 和 spyder。以下是规格:
spyder 3.3.1
ipython 7.0.1
python 3.7.0
pytorch 0.4.1
torchvision 0.2.1
当我打开 spyder 并导入 torch 时,它可以工作。之后我安装了 matplotlib 3.0.1。重新启动 spyder 并再次导入 pytorch 会在 spyder 的 ipython 窗口上显示一条消息:
An error ocurred while starting the kernel
terminate called after throwing an instance of 'std::runtime_error'
what(): expected ) but found 'ident' here:
aten::_addmv(Tensor self, Tensor mat, Tensor vec, *, Scalar beta=1, Scalar alpha=1) ‑> Tensor
~~~~~~ <‑‑‑ HERE
在 bash 终端上,我收到消息:
js: Not allowed to load local resource:
file:///home/user/anaconda3/envs/myenv/lib/python3.7/site-packages/spyder/utils/help/static/css/default.css
几个月来我一直在另一个环境中使用所有这些包(所以它们是旧版本),所以它一定是新版本的东西。
如果我在终端上运行 ipython 或 python,导入工作,所以我得出结论它与 spyder 有关。
“解决方案”很明显:安装旧版本的软件包,但还有其他更可持续的解决方案吗?
【问题讨论】:
标签: python matplotlib anaconda spyder pytorch