pip install package from Artifactory and install dependencies from PyPI

I have a package that I am trying to install from Artifactory by running the following command

pip install package_name -i --trusted-host artifactory.XYZ.com

the package is downloaded fine. However when it comes to finding the dependencies it throws an exception because I don't have a PyPI remote repo in Artifactory.

Is it possible to point pip to PyPI for specific dependencies?

I'm using a pyproject.toml to store the requirements as I'm using poetry top handle dependencies and build the package.

2

3 Answers

Use --extra-index-url instead of -i like hoeffing said

or

create or edit your pip.conf file :

[global]
index-url = --trusted-host artifactory.XYZ.com
1

If anyone uses a requirements.txt file, it's possible to include inside the file.

--index-url
PyYAML==3.11
argparse==1.2.1
frog-bar==0.2
frog-fu==0.2a
nltk==2.0.4
wsgiref==0.1.2

Contact your Artifactory admin to add a virtual repository that will include your local repository and a remote.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

You Might Also Like