Skip to content

Getting error when running basic example #68

@alexzandros

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions