How to configure pypi under Windows?

On my Mac based systems, * nix I configure pip by modifying the files:

  • ~ / .pypirc
  • ~ / .pip / pip.conf

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

+7
source share
4 answers

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 
0
source

PyPA protocol configuration protocols tell you to use the pip.ini file, which is stored either:

  • Globally in C:\ProgramData\pip\ (Win7 and later) or
  • for user at %HOME%\pip\ or
  • per-virtualenv at the root of virtualenv

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

+5
source

I had a problem with this on Windows using setup.py . Getting 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 .

0
source

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/

0
source

All Articles