aspire-samples icon indicating copy to clipboard operation
aspire-samples copied to clipboard

Fail to run `azd init` for sample `AspireWithPython`

Open Menghua1 opened this issue 1 year ago • 6 comments

Describe the issue: For AspireWithPython sample, run the azd init command failed and the error message is as follows: image

Repro Steps:

  1. Clone code.
  2. Run command cd samples/AspireWithPython.
  3. Run command azd init.

Environment:

  • Azd version: azd version 1.10.0-beta.1-daily.4077837 (commit a17935e47211ed01780281974c6d63b467de5b14).
  • Aspire version: 8.2.0/8.0.100.
  • Sample: AspireWithPython.
  • Branch: main.

Expected behavior: azd init command can be executed successfully.

@rajeshkamal5050, @vhvb1989 for notification.

Menghua1 avatar Sep 02 '24 11:09 Menghua1

Do you have Python installed?

DamianEdwards avatar Sep 17 '24 18:09 DamianEdwards

Do you have Python installed?

Yes, we have installed Python and this problem still exists. image

Menghua1 avatar Sep 18 '24 05:09 Menghua1

I'm not familiar with Python or the .venv directory and virtual environments. @mitchdenny any idea on this one?

DamianEdwards avatar Sep 18 '24 17:09 DamianEdwards

Did you initialize the .venv folder? We don't do that for you.

https://learn.microsoft.com/en-us/dotnet/aspire/get-started/build-aspire-apps-with-python?tabs=bash#prepare-a-python-project

mitchdenny avatar Sep 19 '24 04:09 mitchdenny

Did you initialize the .venv folder? We don't do that for you.

https://learn.microsoft.com/en-us/dotnet/aspire/get-started/build-aspire-apps-with-python?tabs=bash#prepare-a-python-project

I have initialized the .venv folder, but there is still this issue: image

Menghua1 avatar Sep 20 '24 01:09 Menghua1

@rajeshkamal5050, @vhvb1989 In the latest round of azd manual testing, this issue still exists.

  • Azd version: azd version 1.11.0-beta.1-daily.4152592 (commit e2ff8ba7dcc5b3f7e883213a2315a8b275294def).
  • Aspire version: 8.2.1/8.0.100.
  • Sample: AspireWithPython.
  • Branch: main.

Menghua1 avatar Sep 27 '24 06:09 Menghua1

The python sample has been updated to auto-initialize the virtual environment and auto-restore pip dependencies as part of #520. Another PR was merged yesterday that makes the sample deployable using azd (#533). Note that the samples have been updated to Aspire 9.0-rc.1 since this issue was originally logged.

DamianEdwards avatar Nov 07 '24 21:11 DamianEdwards