Repository navigation
Closed
Labels
bugSomething isn't working
Description
Describe the bug
On Ubuntu 20.10 the Python installation is referencing some old Ubuntu packages that are missing. In more detail, if used with
container:
image: ubuntu:20.10
then one gets errors such as
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/__w/sagetrac-mirror/sagetrac-mirror/src/.venv/lib/python3.8/site-packages/setuptools/__init__.py", line 18, in <module>
from setuptools.dist import Distribution
File "/__w/sagetrac-mirror/sagetrac-mirror/src/.venv/lib/python3.8/site-packages/_virtualenv.py", line 89, in exec_module
old(module)
File "/__w/sagetrac-mirror/sagetrac-mirror/src/.venv/lib/python3.8/site-packages/setuptools/dist.py", line 32, in <module>
from setuptools import windows_support
File "/__w/sagetrac-mirror/sagetrac-mirror/src/.venv/lib/python3.8/site-packages/setuptools/windows_support.py", line 2, in <module>
import ctypes
File "/__t/Python/3.8.7/x64/lib/python3.8/ctypes/__init__.py", line 7, in <module>
from _ctypes import Union, Structure, Array
ImportError: libffi.so.6: cannot open shared object file: No such file or directory
or
import readline
ImportError: libreadline.so.7: cannot open shared object file: No such file or directory
These can be fixed by manually downloading the corresponding packages from the old Ubuntu distribution, e.g. bionic.
Which version of the action are you using?
-
v1 -
v2 - Some other tag (such as
v2.0.1ormaster)
Environment
- self-hosted
- Linux
- Windows
- Mac
If applicable, please specify if you're using a container: ubuntu:20.10
Python Versions
3.8 and 3.9, at least
To Reproduce
Steps to reproduce the behavior:
- Use setup-python in a ubuntu:20.10 container
- Import something from _ctypes or readline
- Get error
Run/Repo Url
https://github.com/sagemath/sagetrac-mirror/runs/1870813916?check_suite_focus=true
and
https://github.com/sagemath/sagetrac-mirror/runs/1862181456?check_suite_focus=true
Activity
avihaybar commentedon Sep 20, 2021
ImportError: libffi.so.6: cannot open shared object file: No such file or directoryThis happens to me on Ubuntu 20.04 LTS too with Python 3.8.
I did notice that the cached Python version for 3.8 is 3.8.11 which probably disregard the platform version.
Pinning down the version to 3.8.12 is downloading the correct
python-3.8.12-linux-20.04-x64.tar.gz.Ubuntu 20.04 and later uses the updated
libffi.so.7while the cached Python version is looking forlibffi.so.6.see more info here
dsame commentedon Jun 27, 2022
Hello @avihaybar,
The solution suggested by @illia-v is to be discussed and it can take a lot of time. Meanwhile, i suggest you to install the required library manually, will it work for you? Do you need our help to install those libraries within your pipeline?
avihaybar commentedon Jun 27, 2022
thanks for the reply, @dsame.
We have since upgraded internally to Python 3.9.x where the issue is resolved.
dsame commentedon Jun 27, 2022
Thanks @avihaybar for your note. i am going to close this. Feel free to open new issue or reopen this one in case of any problem
dsame commentedon Jun 27, 2022
the same root cause leads to the SEGAULT #442