用IronPython导入matplotlib的错误 [英] import error of matplotlib with IronPython
问题描述
我正在尝试在Ironpython环境中使用matplotlib,使用将matplotlib.pyplot导入为情节".
I am trying to use matplotlib within the Ironpython environment, using "import matplotlib.pyplot as plot".
但是,我已经看到此错误超过3个小时,并且不知道如何解决此问题.
However, I have seen this error for more than 3 hours, and could not figure out how to solve this problem.
cannot import _path from matplotlib
Traceback:
line 35, in <module>, "C:\Users\noclew\AppData\Local\Enthought\Canopy\User\Lib\site-packages\matplotlib\transforms.py"
似乎Iron Iron无法找到_path.pyd文件,即使它可以检测到matplotlib位置也是如此.
It seems that Ironpython cannot locate _path.pyd file, even though it can detect the location of the matplotlib location.
如果您让我如何处理此问题,将不胜感激. 我正在使用从Canopy库中提取的matplotlib 1.3.1和IronPython 2.7.4 32位.
It will be greaaaaatly appreciated if you let me how to deal with this issue. I am using matplotlib 1.3.1 extracted from Canopy library, and IronPython 2.7.4 32bit.
以下是我的导入代码
import clr
clr.AddReference("mtrand")
import rhinoscriptsyntax as rs
import Rhino as r
import nUtil as nu
import nNetworkx as nx
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
推荐答案
不幸的是,IronPython不支持CPython .pyd文件. IronClad项目试图这样做,但是将其更新以与最新的IronPython和CPython一起使用可能会是一项艰巨的任务.
Unfortunately, IronPython does not support CPython .pyd files. The IronClad project attempted to do so but updating it to work with the latest IronPython and CPython would likely be an enormous undertaking.
这篇关于用IronPython导入matplotlib的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!