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 Workbench (previously RStudio Server Pro) to point to that Python Package Repository in order for those packages to be installed.
You can do this by configuring the
pip.conf file, this can be done in a per-user, per-virtual environment or globally. This decision depends on how users in RStudio Workbench manage Python environments and the usage for the custom Python Package Repository.
- If the Python Package Repository is used as a replacement for PyPI, which is common in airgapped environments, then it's usually a good idea to configure this globally.
- If the Python Package Repository is used to host custom private packages for some applications but PyPI is also used to retrieve public packages, then you can configure this only in a per-user or per-application basis.
If you wanted to configure this globally, then you can configure the following in
[global] timeout = 60 index-url = https://my-python-package-repo.internal.com
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.