Skip to content

Instantly share code, notes, and snippets.

@ajaychinthapalli
Created January 16, 2023 02:46
Show Gist options
  • Select an option

  • Save ajaychinthapalli/2fbf970a016c9dcd00a26e35e8377f04 to your computer and use it in GitHub Desktop.

Select an option

Save ajaychinthapalli/2fbf970a016c9dcd00a26e35e8377f04 to your computer and use it in GitHub Desktop.

Revisions

  1. ajaychinthapalli created this gist Jan 16, 2023.
    27 changes: 27 additions & 0 deletions pip-repository-configuration.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,27 @@
    ## pip Repository Configuration for Enterprise

    Add the following lines to your user's or system's pip configuration file `pip.conf`:
    ```text
    [global]
    index = https://enterprise.mycompany.com/repository/pypi
    index-url = https://enterprise.mycompany.com/repository/pypi/simple
    ```

    Afterwards you can confirm that `pip3` is reading your file by running the following command.
    ```text
    pip3 config debug
    ```
    ```text
    Ajays-MBP:~ ajay$ pip3 config debug
    env_var:
    env:
    global:
    /Library/Application Support/pip/pip.conf, exists: False
    site:
    /usr/local/Cellar/[email protected]/3.9.1/Frameworks/Python.framework/Versions/3.9/pip.conf, exists: False
    user:
    /Users/ajay/.pip/pip.conf, exists: False
    /Users/ajay/.config/pip/pip.conf, exists: False
    ```

    **NOTE:** You may need to add a `pip` folder and create the `pip.ini` file yourself.