pipx
pipx copied to clipboard
pip run --pip-args
Hello
Using pipx 1.4, I need to manually add --pip-args
in my install command to hit my private artifactory repository, despite my pip config pointing to it by default:
$ python3 -m pipx install 'pygount' --force --pip-args="--index-url=https://artifactory.my.company.com/artifactory/api/pypi/pypi/simple --trusted-host=artifactory.my.company.com"
How can I set this by default, by defining a configuration file or an environment variable ?
Thanks
I think it would be good to enable configuring standard pip
args via an environment variable, thanks for raising this issue! I'll have a look today.
I have actually 2 pc I think configured the same way, one pipx install kind of use the global pip config, the other not, I do not understand the difference.
I would expect pipx to use pip, so if pip config is made to hit my private pipy be default I would expect pipx run to use the same, but there is a details that I do no catch
For me, with 1.5.0 pipx
-managed pip
can access the configuration. Have you set it globally? Also, if you run pip
in one of your venvs and list the config, it should show your settings? pipx
does nothing other than calling pip
giving its full path.
Indeed, not tried with 1.5...
I tested not working for me and 'pip config list' command list all configurations. I tried copying 'pip.ini' to the path 'C:\Users***\pipx\shared', but it didn't work. Is there a simpler way to just list the configurations with pipx?"
C:\Users\***>pipx -v
pipx >(setup:924): pipx version is 1.5.0
pipx >(setup:925): Default python interpreter is 'c:\users\***\appdata\local\programs\python\python39\python.exe'
C:\Users\***>pipx run pycowsay
Fatal error from pip prevented installation. Full pip output in file:
C:\Users\***\pipx\logs\cmd_2024-05-06_08.48.41_pip_errors.log
Some possibly relevant errors from pip install:
ERROR: Could not find a version that satisfies the requirement cowsay (from versions: none)
ERROR: No matching distribution found for cowsay
Error installing cowsay.
C:\Users\***>pip config list
global.extra-index='https://registry.cnfi.stratus.int.**.ca/service/rest/repository/browse/iaas-pypi/'
global.extra-index-url='https://registry.cnfi.stratus.int.**.ca/repository/iaas-pypi/simple/'
global.trusted-host='pypi.org files.pythonhosted.org pypi.python.org registry.cnfi.stratus.int.***.ca'
Edit:
pip do use config files from virtual environments too %UserProfile%\Envs\environment_DIR\pip.ini