On my Mac based systems, * nix I configure pip by modifying the files:
The documentation I have found so far says that in windows you need to set the HOME environment variable and put the files in:
% START% .pypirc% HOME% \ pip \ pip.conf
However, this does not work for me, and when I try to use pip to install the package from one of our alternative servers, the package cannot be found. Any suggestions?
The links I have found so far
I was not able to use my mirror repository automatically magical , just installing my configuration files, but I was able to use the repositories with the -i option:
pip install -i http://url.to.my.repository package_name
PyPA protocol configuration protocols tell you to use the pip.ini file, which is stored either:
pip.ini
C:\ProgramData\pip\
%HOME%\pip\
In the case of multiple pip.ini files, the settings for each user override the global settings. See the docs for more details.
I had a problem with this on Windows using setup.py . Getting error:
setup.py
ValueError: <repository> not found in .pypirc
From this, I found that distutils only uses ~/.pypirc . And so you need to make the file %USERPROFILE%/.pypirc .
distutils
~/.pypirc
%USERPROFILE%/.pypirc
I tried to figure out where to put .pypirc on my Windows installation and the answer was C:\Users\YourName\.pypirc . Thanks Ernst Haagsman https://blog.jetbrains.com/pycharm/2017/05/how-to-publish-your-package-on-pypi/
C:\Users\YourName\.pypirc