Skip to content

Configuring Python Environments#

Once you have obtained the repository URL, your environment must be configured to use the URL to download and install packages.

pip#

To configure pip globally for all projects, use the pip config command to set the global.index-url to your repository URL:

Terminal
$ pip config set global.index-url https://packagemanager.posit.co/pypi/latest/simple

Tip

If using virtual environments with venv, activate your virtual environment first, then run the pip config command above to set the Package Manager repository for that specific environment. Refer to Installing packages using pip and virtual environments in the Python documentation for more information.

requirements.txt#

To use a Package Manager repository with a specific project defined by a requirements.txt file, add -i [repositoryURL] to the top of your file, for example:

requirements.txt
-i https://packagemanager.posit.co/pypi/latest/simple
pandas
scipy
...