Skip to content

Getting error when running basic example #68

Open

Description

@alexzandros

Hi, I'm trying to run the basic example where you install spacy library using pip.

This is the code I'm using:

namespace spacy_csharp;

using Python.Included;
using Python.Runtime;

internal class Program
{
    static async Task Main(string[] args)
    {
        await Installer.SetupPython();
        await Installer.TryInstallPip();
        await Installer.PipInstallModule("spacy");
        PythonEngine.Initialize();
        dynamic spacy = Py.Import("spacy");
        Console.WriteLine("Spacy version: " + spacy.__version__);
    }
}

The project compiles well, but I'm getting this runtime error

Image

Any pointers, am I missing something?

Activity

  1. henon commented on Jul 24, 2025

    @henon
    Owner

    Check out this comment, it might be the same problem you are seeing: #54 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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