0

I am trying to use matplotlib within the Ironpython environment, using "import matplotlib.pyplot as plot".

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"

It seems that Ironpython cannot locate _path.pyd file, even though it can detect the location of the matplotlib location.

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.

Here below is my importing code

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
4
  • Do you have any code for us to examine? Commented May 6, 2014 at 4:54
  • Dear Elginat, I am trying to use IronPython within the Rhino 3D modeling Environment, and am just importing them without any code :( Do you see any problem here? Commented May 6, 2014 at 4:58
  • What do you mean by "matplotlib 1.3.1 extracted from Canopy library"? Commented May 6, 2014 at 6:57
  • Oh, I referenced the matplotlib directory in the Canopy IDE library folder into the current IronPython environment. Is it wrong? Commented May 6, 2014 at 7:21

1 Answer 1

3

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.

Sign up to request clarification or add additional context in comments.

3 Comments

Thanks Jeff. Then, there is no good way to use MatPlotLib in IronPython at this moment?
Not as far as I know, unfortunately.
Thanks Jeff. Sad but good to know. Need to find out some other packages to plot numpy things...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.