azure-search-openai-demo icon indicating copy to clipboard operation
azure-search-openai-demo copied to clipboard

ERROR: required external tools are missing: Python CLI is not installed

Open ericthomas1 opened this issue 1 year ago • 11 comments

Please provide us with the following information:

This issue is for a: (mark with an x)

- [X ] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

  1. Install azd
  2. azd auth login
  3. azd init -t azure-search-openai-demo
  4. Add a new environment name
  5. azd up

Any log messages given by the failure

? Please select an Azure Subscription to use:  1. MY_AZUR_SUB
? Please select an Azure location to use: 47. (US) South Central US (southcentralus)

Packaging services (azd package)

ERROR: required external tools are missing:
 - Python CLI is not installed, please see https://wiki.python.org/moin/BeginnersGuide/Download to install

Expected/desired behavior

I definitely have python installed!

OS and Version?

Windows 11 Pro

Versions

Version 10.0.22000 Build 22000

Mention any other details that might be useful

  • Tried both the integrated powershell terminal in VS Code and standalone powershell terminal.
  • Same issue

Thanks! We'll be in touch soon.

ericthomas1 avatar Apr 26 '23 00:04 ericthomas1

Installed python 3.11 and azd up worked. But why? I definitely had python already installed. I use it everyday.

ericthomas1 avatar Apr 26 '23 00:04 ericthomas1

Installed python 3.11 and azd up worked. But why? I definitely had python already installed. I use it everyday.

I think it depends on how you had python installed. I had the same issue and re-installing python 3.11 from python.org/downloads fixed it. I don't remember exactly how I installed python 3.11 previously, but I too have been using python on my machine forever but I definitely did not recognize the installer experience from the installer downloaded from python.org. Either way, azd up works for me now for this project.

dmi-harlow avatar May 19 '23 18:05 dmi-harlow

Same here. Python from Microsoft store didn't work. I re-installed python from python.org and azd up works as expected. https://www.python.org/downloads/

SIkebe avatar Jun 28 '23 05:06 SIkebe

Same issue with the azure cli not finding python/python3 even though it can be found in a terminal after installing with yum on a Red Hat Linux OS. Is there a specific location python needs to be installed at? 6dc32137-b1b8-43aa-bf8f-a7d077d4bb0b

vprzybylo avatar Jun 30 '23 17:06 vprzybylo

@vprzybylo , the script uses python instead of python3. You can either update the script on your end to use python3 or you can see if python-is-python3 is available for Red Hat (it is for Ubuntu), which would create the alias on your system for python

vhvb1989 avatar Jun 30 '23 18:06 vhvb1989

@vhvb1989 thanks for the response. No luck changing python3 to python in prepdocs.sh and I set up an alias for python to point to /usr/bin/python3. Both python and python3 are found and bring up the python interpreter from a terminal but 'azd up' doesn't recognize the installation.

vprzybylo avatar Jun 30 '23 19:06 vprzybylo

@vprzybylo , can you run azd up --debug and share the output. azd looks for phyton on system path. I'd like to see the full error on stderr (if available, for azd)

vhvb1989 avatar Jun 30 '23 20:06 vhvb1989

image --debug doesn't give any specific python error. The system path for python is /usr/bin/python

vprzybylo avatar Jun 30 '23 23:06 vprzybylo

@vprzybylo , I just noticed that on your case, azd is falling even before running prepdocs script. azd is failing to detect python within your system. azd looks for python3 to be in the path (code here).

Can you tell what RedHat version are you using. I will try to repro on my side.

vhvb1989 avatar Jun 30 '23 23:06 vhvb1989

@vprzybylo, I couldn't repro on Red hat 8.5.0-18

I installed python using sudo yum install python38 and/or sudo yum install python39. (can't use sudo yum install python3 as it get python 3.6, and azd requires python >= 3.7)

For node, I used fnm like fnm use 18. This is b/c installing nodjs with yum was also pulling python 3.6.

Can you tell if you are also using yum ?
btw, having same results with dnf

vhvb1989 avatar Jul 02 '23 21:07 vhvb1989

Thanks for trying to reproduce. Here is some more info: image I used sudo yum install python39 and curl -sL https://rpm.nodesource.com/setup_x.x | bash with yum install -y nodejs and checked that there is no python3.6 installed in /usr/bin. I also tried spinning up a fresh VM to reinstall the requirements with fnm but ran into the same issue.

vprzybylo avatar Jul 03 '23 18:07 vprzybylo

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this issue will be closed.

github-actions[bot] avatar Dec 28 '23 01:12 github-actions[bot]