Skip to content
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

ERROR: No matching distribution found for promptflow #3895

Open
cetmca opened this issue Dec 31, 2024 · 2 comments
Open

ERROR: No matching distribution found for promptflow #3895

cetmca opened this issue Dec 31, 2024 · 2 comments

Comments

@cetmca
Copy link

cetmca commented Dec 31, 2024

Hi Team,

I am getting the below error at the build step, did any one else faced this issue ?
Kindly help.

23.81 ERROR: Could not find a version that satisfies the requirement promptflow>=0.2.0 (from versions: none)
23.81 ERROR: No matching distribution found for promptflow>=0.2.0
23.81
23.81 ERROR conda.cli.main_run:execute(125): conda run pip install -r /flow/requirements.txt failed. (See above for error)

#14 33.90 ERROR: Could not find a version that satisfies the requirement promptflow (from versions: none)
#14 33.90 ERROR: No matching distribution found for promptflow
#14 33.90
#14 33.90 ERROR conda.cli.main_run:execute(125): conda run pip install promptflow failed. (See above for error)
#14 33.90
#14 33.90 ERROR conda.cli.main_run:execute(125): conda run conda run -n promptflow-serve pip install promptflow failed. (See above for error)
#14 33.90 Could not fetch URL https://pypi.org/simple/promptflow/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/promptflow/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1129)'))) - skipping
#14 33.90 Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1129)'))) - skipping

/flow/requirements.txt
promptflow>=0.2.0
promptflow-tools
---PS C:\PromptFlow> docker build --no-cache -t my-image12 . --progress=plain --debug

full error

[ 5/12] RUN conda create -n promptflow-serve python=3.9.16 pip=23.0.1 -q -y && conda run -n promptflow-serve pip install -r /flow/requirements.txt &&
conda run -n promptflow-serve pip install promptflow && conda run -n promptflow-serve pip install keyrings.alt && conda run -n promptflow-serve pip install gunicorn==22.0.0 && conda run -n promptflow-serve pip install 'uvicorn>=0.27.0,<1.0.0' && conda run -n promptflow-serve pip cache purge && conda clean -a -y:
30.20 WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1129)'))': /simple/promptflow/
30.20 WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1129)'))': /simple/promptflow/
30.20 WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1129)'))': /simple/promptflow/
30.20 ERROR: Could not find a version that satisfies the requirement promptflow==1.16.1 (from versions: none)
30.20 ERROR: No matching distribution found for promptflow==1.16.1
30.20
30.20 ERROR conda.cli.main_run:execute(125): conda run pip install -r /flow/requirements.txt failed. (See above for error)
30.20 Could not fetch URL https://pypi.org/simple/promptflow/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/promptflow/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1129)'))) - skipping
30.20 Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1129)'))) - skipping

@Anilalkg
Copy link

Anilalkg commented Jan 2, 2025

Added these two lines, used our proxy and was able to pass the docker build

ENV HTTP_PROXY=http://17x.xx.xx.xx0:13xx5
ENV HTTPS_PROXY=http://17x.xx.xx.xx0:13xx5

RUN echo "[global]\ntrusted-host = pypi.org pypi.python.org files.pythonhosted.org\n" > /etc/pip.conf

Note : this will create issue when the docker image starts up in prod.
So to avoid that you need to override ENV HTTP_PROXY/ENV HTTPS_PROXY to empty in the Portal App Service, environment configuration layer

related : #3899

@Anilalkg
Copy link

update - the above may not be a correct approach, as it failed for me in the server start up in the portal.
But added the below in the DockerFile worked.

--- --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org

my changes are below

RUN apt-get update && apt-get install -y runit gcc
RUN conda config --set ssl_verify false

create conda environment

RUN conda create -n promptflow-serve python=3.9.16 pip=23.0.1 -q -y &&
conda run -n promptflow-serve
pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org -r /flow/requirements.txt &&
conda run -n promptflow-serve pip install promptflow &&
conda run -n promptflow-serve pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org keyrings.alt &&
conda run -n promptflow-serve pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org gunicorn==22.0.0 &&
conda run -n promptflow-serve pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org 'uvicorn>=0.27.0,<1.0.0' &&
conda run -n promptflow-serve pip cache purge &&
conda clean -a -y

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants