[Python] Error building and installing custom python package

Discussão em 'Python' iniciado por Stack, Novembro 28, 2024.

  1. Stack

    Stack Membro Participativo

    I'm trying to distribute my custom python package through GCP Artifact repository and use it in my project but got a dependent error.

    pyproject.toml:

    ...
    dependencies = [
    "pandas>=2.2.3",
    "numpy>=1.26.4",
    "sentence-transformers>=3.0.1",
    "scikit-learn>=1.5.2",
    "racplusplus>=0.1.1",
    "requests>=2.32.3",
    "vertexai>=1.48.0",
    "python-dotenv>=1.0.1",
    "gcsfs>=2024.10.0"
    ]


    I build the package with the following command python -m build --sdist --wheel and upload it with python3 -m twine upload --non-interactive --config-file .pypirc --repository-url "https://${{ env.GCP_REGION }}-python.pkg.dev/${{ env.GCP_PROJECT_ID }}/${{ env.GCP_REPOSITORY }}/" dist/*

    But when I try to install it with pip install mf-ai-subrequests==1.0.0 --index-url https://$GCP_REGION-python.pkg.dev/$GCP_PROJECT_ID/$GCP_REPOSITORY/simple/

    Got the following error:

    ERROR: Could not find a version that satisfies the requirement pandas==2.2.3 (from mf-ai-subrequests) (from versions: none)
    ERROR: No matching distribution found for pandas==2.2.3


    Any idea how to solve it?

    Continue reading...

Compartilhe esta Página