I have a package that I am trying to install from Artifactory by running the following command
pip install package_name -i http://artifactory.XYZ.com/artifactory/api/pypi/XYZ-py-local/simple --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.
3 Answers
Use --extra-index-url
instead of -i
like hoeffing said
or
create or edit your pip.conf file :
[global] index-url = http://artifactory.XYZ.com/artifactory/api/pypi/XYZ-py-local/simple --trusted-host artifactory.XYZ.com
1If anyone uses a requirements.txt file, it's possible to include inside the file.
--index-url http://localhost:8081/artifactory/api/pypi/pypi-local/simple 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.
https://www.jfrog.com/confluence/display/RTF/Virtual+Repositories
ncG1vNJzZmirpJawrLvVnqmfpJ%2Bse6S7zGiorp2jqbawutJobG5rYWV%2Fc4WOqaCpZZmjwLWty6VkqZmToK6osYyfqailXZa%2FtbXFmpqtp6KueqK6w2agp6uklrmtecOep56mlJq7pLXErGSfqp%2BierHFz6I%3D