Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you configure pypi under Windows?

Tags:

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

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

The documentation that I've found so far, says that under windows you need to set the HOME environment variable and place the files in:

  • %HOME%\.pypirc
  • %HOME%\pip\pip.conf

However, this doesn't seem to work for me and when I try to use pip to install a package from one of our alternate servers the package can't be found. Any suggestions?

Links I've found so far

  • https://pypi.python.org/pypi/devpi-server/0.8 (see section on permanent pip configuration)
  • http://www.pip-installer.org/en/latest/configuration.html (see section on config file)
like image 469
aquil.abdullah Avatar asked May 06 '13 16:05

aquil.abdullah


People also ask

Where is the pip config file windows?

On Windows the configuration file is %APPDATA%\pip\pip.

Where is .pypirc located?

pypirc file is loaded from the $HOME directory (or %USERPROFILE% on Windows).


2 Answers

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.

like image 174
Petri Avatar answered Sep 27 '22 20:09

Petri


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/

like image 23
hum3 Avatar answered Sep 27 '22 19:09

hum3