Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Cythonized python.net code cannot find system assemblies #941

Open
@crayxt

Description

@crayxt

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp