Is it possible to install and import Matplotlib, Tkinter, SymPy into IronPython for use in Rhino?

Question, as the title says. Work on a project that requires Sympy, Matplotlib, and Tkinter to be imported through IronPython. The code will run in Rhino, which uses Python 2.7. Is there any way to do this? I saw a 2014 question saying that Tkinter just doesn't work in IronPython, but maybe the situation has improved since then.

SymPy is the most important library to import. Check out the documentation, but this is a bit unclear.

Update

So, I was able to install pythonnet in my python interpreter, after having strongly switched to the .whl file, and not to cmd. Now we encounter the following error when trying to import clr into Anaconda (Python 2.7):

So, after compiling the following code snippet -

import clr clr.AddReference("System.Windows.Forms") from System import String from System.Collections import * from System.Windows.Forms import Form print "Hello" 

We get this error:

 'import sitecustomize' failed; use -v for traceback Hello 

Any code listed below the import statements still works (thus "Hello"), but I would like to know what this error means or what causes it. Thanks in advance.

* Other update **

Posted on the Rhino forums, there seems to have been no change to the Rhino IronPython implementation so that it can reference previously incompatible libraries. Instead, they recommended using Eto. Thanks for the help!

+5
source share

Source: https://habr.com/ru/post/1263088/


All Articles