in a short format, I'm preparing a python script to search all required dependencies in a private pypi repo
if all dependencies exist in the repo, the script tops, if not it builds them and pushes them to the pypi repo
I have seen some examples using:
search_command = pip.commands.search.SearchCommand()
options, _ = search_command.parse_args([name, "--index", publish_pypi_simple_url])
pypi_hits = search_command.search(name, options)
hits = pip.commands.search.transform_hits(pypi_hits)
However when running this code i get
AttributeError: module 'pip' has no attribute 'commands'
Does anyone have a good solution for performing pip searches in a private pypi repository with a python script?
Thank you all in advance
EDIT:
My problem was related to badly installed python environments.