You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
macOS: AddReference find the reference, but the module is not found #643
We have compiled Python.Runtime.dll for python 3.6 in Windows for each OS: Windows, macOS and Linux. Then we create a nuget package to distribute the library (along with nPython.exe) to be used with Lean. The following commands were used:
When execute nPython.exe in Windows and try to import System, I can do it successfully:
C:\Users\Alex\Lean\Launcher\bin\Debug>nPython.exe
Python 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:54:40) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from clr import AddReference
>>> ref = AddReference("System")
>>> ref.FullName
'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
>>> import System
>>>
In Linux:
root@52578947ccd3:~/Lean/Launcher/bin/Debug# mono nPython.exe
Python 3.6.4 |Anaconda, Inc.| (default, Jan 16 2018, 18:12:19)
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from clr import AddReference
>>> ref = AddReference("System")
>>> ref.FullName
'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
>>> import System
>>>
However, in macOS High Sierra:
Alexandres-Mac:Debug alex$ mono nPython.exe
Python 3.6.4 |Anaconda, Inc.| (default, Jan 16 2018, 12:06:34)
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from clr import AddReference
>>> ref = AddReference("System")
>>> ref.FullName
'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
>>> import System
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'System'
We added the symbolic link to the mono in python lib:
Alexandres-Mac:lib alex$ pwd
/Users/alex/anaconda3/lib
Alexandres-Mac:lib alex$ ls -lrt mono*
lrwxr-xr-x 1 alex staff 60 Mar 9 04:07 mono -> /Library/Frameworks/Mono.framework/Versions/Current/lib/mono
Activity
den-run-ai commentedon Mar 10, 2018
cc Mac OSX users @nsbruce @fractus @mikofski @AaronScruggs
If this is resolved, then you can update this osx notes here:
https://github.com/pythonnet/pythonnet/wiki/Troubleshooting-on-Windows,-Linux,-and-OSX#osx-notes
den-run-ai commentedon Mar 10, 2018
@AlexCatarino try out the featured branch according to the same issue here:
#603
AlexCatarino commentedon Apr 6, 2018
@denfromufa The problem was solved using the
featurebranch and rebasing withmaster. Sorry about the false alarm.den-run-ai commentedon Nov 14, 2018
this is now in master: #723