Accessing Another Project's PyPI Package in CICD

I have one project which publishes an package to gitlab’s pypi repository for the project that I want to use in another project’s cicd script which also exists in gitlab, however, everything I’ve tried doesn’t seem to not work.

I’ve tried installing from source:

pip install git+ssh://git@gitlab.com/mygroup/myproject.git@master

I’ve tried generating a pypi package and referencing that:

pip install --extra-index-url https://token:{CI_JOB_TOKEN}@gitlab.com/api/v4/projects/<package-id>/packages/pypi/simple myproject pip install --extra-index-url https://gitlab-ci-token:{CI_JOB_TOKEN}@gitlab.com/api/v4/projects//packages/pypi/simple myproject

How can I get package in gitlab pypi to be accessible to another pipeline job?