-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve the first 30-minutes experience #314
Comments
I think the overall experience is good, all I needed was to go through the docs and was up and running in a few minutes. Here are my 2cents if you need it:
Also, if I already have a fully set up venv in let's say |
Well, I don't want to sound like jerk but, I think the first 30m experience is horrible. I'm in more like the first 3h and I still can't get it working. I am working on MacOS using Rider. I agree with @NimaAra about using an option pattern with WithPython(). The other extension methods do things that aren't immediately apparent ie appending things to the path supplied. I am surprised that the FromNuGet() method only supports windows. I tried to create my own to support MacOS but because downstream it appends "bin/xyz" type stuff it doesn't work or requires more work from me overriding all the GetXXX methods in the Locator. I then tried to just setup my own environment variable but that too gets appended with other path stuff so it fails. My goal is to provide a .Net MAUI app that wraps some customized Python libraries, but I don't see how I would provide this where Python gets installed with the MAUI app. Anyway my current tests are just with a simple console app. |
@jmichas, You do have some control over setting the various required paths. I used the following, you need to set the paths according to your python installation. I suggest you use uv to manage your python installations. internal sealed class ContainerLocator : PythonLocator
{
public ContainerLocator() => Version = ServiceCollectionExtensions.ParsePythonVersion("3.12");
protected override Version Version { get; }
public override PythonLocationMetadata LocatePython()
{
string pythonFolder = "/usr/bin";
string libPythonPath = "/usr/lib/x86_64-linux-gnu/libpython3.12.so";
string pythonPath = "/usr/lib/python3.12/lib-dynload";
string pythonExec = "/usr/bin/python3.12";
PythonLocationMetadata result = new(pythonFolder, Version, libPythonPath, pythonPath, pythonExec, Debug: true);
return result;
}
} Which you can use as: ...
services
.AddSingleton<PythonLocator>(new ContainerLocator()); |
I'm adding a locator that fetches a version of Python for you, this is the same prebuilt site that UV uses. I'll look at this becoming the default locator, so if you just say |
We need to improve the developer experience for the first 30 minutes.
If anyone else has any thoughts on how things could be easier/simpler to get started please add in the comments.
The text was updated successfully, but these errors were encountered: