Problem
When using RHEL/CentOS Linux distributions to host Posit Connect, you may run into an error below when using Python:
level=error msg="error: error checking python libraries at /opt/python/{$PYTHON_VERSION}/bin/python3: an error occurred when running python info script: exit status 1; full output: Traceback (most recent call last):\n File \"/opt/rstudio-connect/python/package_info.py\", line 57, in <module>\n package_info[\"setuptools\"] = setuptools.__version__\nAttributeError: module 'setuptools' has no attribute '__version__'\n"
Note that this error only occurs if you've installed Python and pointed your Connect configuration file to your Python installation as below:
[Python]
Enabled = True
Executable = /opt/python/{$PYTHON_VERSION}/bin/python3
Solution
This is actually a known issue which can be found here:
https://github.com/rstudio/python-builds/issues/53
The fix is to run the command below:
chmod 755 -R /opt/python
From there, restart the Connect service for this to take effect:
sudo systemctl restart rstudio-connect
Support Ticket
If you still have issues after completing the above, you can always lodge a support ticket, where our group of friendly, and incredibly knowledgeable staff can assist with any issues that you may be having. You can submit a ticket here:
Comments