- Notifications
You must be signed in to change notification settings - Fork750
Open
Description
Dup of my SO questionhttps://stackoverflow.com/questions/57493309/cythonized-python-net-code-cannot-find-system-assemblies
When I compile the python code which uses python.net to access .Net assemblies, it can't find those assemblies. Without compilation it works ok.
For demo code, I usedhttps://github.com/pythonnet/pythonnet/blob/master/demo/helloform.py
My setup.py file
from distutils.core import setupfrom distutils.extension import Extensionfrom Cython.Build import cythonizeext_modules = [ Extension( 'helloform', sources = ['helloform.py'], language = 'c++' )]setup( name = 'helloform', ext_modules = cythonize(ext_modules),)
Then I build it with python setup.py build_ext --inplace.
I wanted to load compiled module from Python prompt with import helloform but it failed with
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "helloform.py", line 8, in init helloformModuleNotFoundError: No module named 'System'
Metadata
Metadata
Assignees
Labels
No labels