Package Manager PyPI: HTTP error 404 Client Error

Hi everybody,

we ran into some strange problems with our Posit Package Manager when we tried to include PyPI as a source for python packages.
We followed the installation guide carefully, i.e. we initialized the repo as follows:

rspm create repo --name=pypi --type=python --description='Access PyPI packages'
rspm subscribe --repo=pypi --source=pypi
rspm sync --type=pypi

We can see on the UI of Package Manager, that the meta data is gathered correctly (Screenshot of our UI):

At the user end we made sure to let pip know where to look, i.e., we executed the following lines on our Posit Workbench Server:

pip config set global.trusted-host OURPACKAGESERVER
pip config set global.index-url https://OURPACKAGESERVER:XXXX/pypi/latest/simple

We further checked, if the configuration was successfull:

$ pip config list
global.index-url='https://OURPACKAGESERVER:XXXX/pypi/latest/simple'
global.trusted-host='OURPACKAGESERVER'

Now we come to the strange part, if we try to install a package, either in the terminal or by using reticulate, we get the following:

$ pip install pypdf
Looking in indexes: https://OURPACKAGESERVER:XXXX/pypi/latest/simple
Collecting pypdf
  ERROR: HTTP error 404 while getting https://OURPACKAGESERVER/pypi/latest/packages/pypdf/f6e598292be34187287a609c72815c1502b3dc2c997b374ba0870ce79d2e975a/pypdf-3.15.2-py3-none-any.whl#sha256=f6e598292be34187287a609c72815c1502b3dc2c997b374ba0870ce79d2e975a (from https://OURPACKAGESERVER:XXXX/pypi/latest/simple/pypdf/) (requires-python:>=3.6)
ERROR: Could not install requirement pypdf from https://OURPACKAGESERVER/pypi/latest/packages/pypdf/f6e598292be34187287a609c72815c1502b3dc2c997b374ba0870ce79d2e975a/pypdf-3.15.2-py3-none-any.whl#sha256=f6e598292be34187287a609c72815c1502b3dc2c997b374ba0870ce79d2e975a because of HTTP error 404 Client Error: Not Found for url: https://OURPACKAGESERVER/pypi/latest/packages/pypdf/f6e598292be34187287a609c72815c1502b3dc2c997b374ba0870ce79d2e975a/pypdf-3.15.2-py3-none-any.whl for URL https://OURPACKAGESERVER/pypi/latest/packages/pypdf/f6e598292be34187287a609c72815c1502b3dc2c997b374ba0870ce79d2e975a/pypdf-3.15.2-py3-none-any.whl#sha256=f6e598292be34187287a609c72815c1502b3dc2c997b374ba0870ce79d2e975a (from https://OURPACKAGESERVER:XXXX/pypi/latest/simple/pypdf/) (requires-python:>=3.6)

We checked for the Python version:

$ python -V
Python 3.7.6

It seems that the packages are not downloaded, only their metadata. Maybe somebody can offer advice here.
Additional information:

  • Posit Package Manger is on another machine
  • We use a proxy, i.e., we have the following configured in /etc/systemd/system/rstudio-pm.service.d/user.conf
[Service]
User=rstudio-pm
Group=rstudio-pm
Environment=http_proxy=http://OURPROXY
Environment=https_proxy=http://OURPROXY
Environment=no_proxy=OURGITLAB

Hi everybody,

we finally found a solution, thanks to our Posit resale partners here in Germany, so the fame goes to them, I am just the messenger.

We needed to adjust our rstudio-pm.gcfg by adding the port to our public address, originally we dropped that part.

So the [SERVER] block of our config file of the Posit Package Manager has to look like this:

[Server]
RVersion = HERE_LIVES_OUR_R
Address = https://OURPACKAGESERVER:XXXX  (<- this :XXXX is what we missed!)

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.