Alpine installation ignores Python 3.9
- Dominant language
- C
- Stars
- 22.7k
- Forks
- 4.1k
- Avg merge
- 10d 4h
- Merged PRs (30d)
- 3
Description
I'm trying to install BCC from the community repositories on Alpine with Python 3.9 installed.
Unfortunately, the installation ignores the existing python and installs Python 3.8 instead.
```
~ docker run -it --entrypoint=/bin/sh python:3.9-alpine
/ # apk update
fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/community/x86_64/APKINDEX.tar.gz
v3.13.5-192-g9af04e1760 [https://dl-cdn.alpinelinux.org/alpine/v3.13/main]
v3.13.5-187-g1477654ee3 [https://dl-cdn.alpinelinux.org/alpine/v3.13/community]
OK: 13891 distinct packages available
/ # ln -s $(which python3) /usr/bin/python
/ # apk add bcc-tools bcc-doc
(1/9) Installing bcc-doc (0.18.0-r0)
(2/9) Installing fts (1.2.7-r1)
(3/9) Installing libelf (0.182-r0)
(4/9) Installing libgcc (10.2.1_pre1-r3)
(5/9) Installing libstdc++ (10.2.1_pre1-r3)
(6/9) Installing bcc (0.18.0-r0)
(7/9) Installing python3 (3.8.10-r0)
(8/9) Installing py3-bcc (0.18.0-r0)
(9/9) Installing bcc-tools (0.18.0-r0)
Executing busybox-1.32.1-r6.trigger
OK: 116 MiB in 45 packages
/ # python3.9
Python 3.9.4 (default, Apr 15 2021, 04:50:04)
[GCC 10.2.1 20201203] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import bcc
Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'bcc'
>>> exit()
/ # python3.8
Python 3.8.10 (default, May 6 2021, 00:05:59)
[GCC 10.2.1 20201203] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import bcc
>>> exit()
/ #
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the issue with the shown python:3.9-alpine Docker command and apk installation of bcc-tools and bcc-doc. Inspect how the Alpine packages select and install Python and py3-bcc; done means an existing Python 3.9 installation is used and `import bcc` succeeds there.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, linux, python
- Domain
- build-system, devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100