1
我想在我的python腳本中使用sympy庫,但是當我嘗試導入它時出現錯誤。我該如何解決? IronPython中的sympy導入錯誤2.7
我想在我的python腳本中使用sympy庫,但是當我嘗試導入它時出現錯誤。我該如何解決? IronPython中的sympy導入錯誤2.7
您正在使用的庫似乎利用內部API來獲取當前堆棧/活動對象的信息。 爲了提供所需的信息和界面,您必須運行IronPython以及-X:FullFrames
參數。
如果您計劃從C#this answer託管IronPython,請說明必要的步驟。
而不是以前的情況/錯誤
C:\Program Files (x86)\IronPython 2.7>ipy
IronPython 2.7.5 (2.7.5.0) on .NET 4.0.30319.42000 (32-bit)
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys._getframe(0)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute '_getframe'
你會得到預期的行爲
C:\Program Files (x86)\IronPython 2.7>ipy -X:FullFrames
IronPython 2.7.5 (2.7.5.0) on .NET 4.0.30319.42000 (32-bit)
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys._getframe(0)
<frame object at 0x000000000000002B>
我得到與-X運行IPY以下錯誤:FullFrames: HTTP:// imgur .com/6vA8LfB – Rahul
是[此問題](http://stackoverflow.com/questions/29683868/c-ironpython-and-sympy-unicode-escape-decode-takes-no-arguments)相關? –
是的,謝謝:) – Rahul