Search code examples
pythonpipgitlabpypipython-poetry

Install private gitlab package with specific version


I have private gitlab package. His current version == 0.2.15

I am build and publish package with poetry. Always I install package as

pip install sdk --index-url https://__token__:<token>@gitlab.example.com/api/v4/projects/6/packages/pypi/simple

I need to install specific version of package (0.2.13 f.e.). How can I do it? I tried with @0.2.13 and #0.2.13. It's not work.


Solution

  • The package version is specified with ==.

    pip install sdk==0.2.13 \
        --index-url 'https://__token__:<token>@gitlab.example.com/api/v4/projects/6/packages/pypi/simple'