Configure a different Python Package Repository for RStudio Connect

Follow

If you have a custom Python Package Repository for your own Python packages, or have a PyPI mirror inside your firewall (this is common if your servers cannot access the Internet for security purposes, i.e., offline or air-gapped). You can configure the Python installations used by RStudio Connect to point to that Python Package Repository in order for those packages to be installed.

Since RStudio Connect uses pip to install Python packages, you can do this by configuring the pip.conf file, which can be done in a per-user, per-virtual environment or globally. Since RStudio Connect creates virtual environments for each Jupyter Notebook and Python application, we recommend to configure this file globally in /etc/pip.conf.

If you wanted to configure this globally, then you can configure the following in /etc/pip.conf:

[global]
timeout = 60
index-url = https://my-python-package-repo.internal.com

For more information about Python package management in RStudio Connect, refer to the RStudio Connect Administration Guide.

For more information about configuring pip.conf, refer to the pip user guide.

If you are using a custom artifact repository, then you can refer to its documentation for configuring and administering Python package repositories.

Comments