How do you configure pypi under Windows?

I was trying to work 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/


I had a problem with this in Windows using setup.py. Getting the error:

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.


The pip configuration docs at PyPA tell you to use a pip.ini file stored either:

  1. Globally at C:\ProgramData\pip\ (Win7 and up), or
  2. per-user at %HOME%\pip\ or
  3. per-virtualenv at the virtualenv root

In case of multiple pip.ini files, per-user settings override global settings. See the docs for more details.

Tags:

Windows

Pypi