tldr;
pip3 stopped working because of missing /opt/gitlab/embedded/include/
folder after version 10.6.5-ce
Manually readding it seems to (temporarily) solve the problem.
I took over from my predecessor a fully set up gitlab-ce sever. So even basic tips might help me
Problem
We use gitlab-ci for a internal project, which used to work quite fine.
But the new version of gitlab-ce (we are currently on 10.7.4-ce) throws an error when using pip3 in the .gitlab-ci.yml
$ sudo /opt/gitlab/embedded/bin/pip3 install requests
Requirement already satisfied: requests in /opt/gitlab/embedded/lib/python3.4/site-packages
Requirement already satisfied: certifi>=2017.4.17 in /opt/gitlab/embedded/lib/python3.4/site-packages (from requests)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /opt/gitlab/embedded/lib/python3.4/site-packages (from requests)
Requirement already satisfied: urllib3<1.22,>=1.21.1 in /opt/gitlab/embedded/lib/python3.4/site-packages (from requests)
Requirement already satisfied: idna<2.6,>=2.5 in /opt/gitlab/embedded/lib/python3.4/site-packages (from requests)
Exception:
Traceback (most recent call last):
File "/opt/gitlab/embedded/lib/python3.4/distutils/sysconfig.py", line 442, in _init_posix
with open(filename) as file:
FileNotFoundError: [Errno 2] No such file or directory: '/opt/gitlab/embedded/include/python3.4m/pyconfig.h'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/gitlab/embedded/lib/python3.4/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/opt/gitlab/embedded/lib/python3.4/site-packages/pip/commands/install.py", line 350, in run
isolated=options.isolated_mode,
File "/opt/gitlab/embedded/lib/python3.4/site-packages/pip/commands/install.py", line 436, in get_lib_location_guesses
scheme = distutils_scheme('', *args, **kwargs)
File "/opt/gitlab/embedded/lib/python3.4/site-packages/pip/locations.py", line 153, in distutils_scheme
i.finalize_options()
File "/opt/gitlab/embedded/lib/python3.4/distutils/command/install.py", line 283, in finalize_options
(prefix, exec_prefix) = get_config_vars('prefix', 'exec_prefix')
File "/opt/gitlab/embedded/lib/python3.4/distutils/sysconfig.py", line 494, in get_config_vars
func()
File "/opt/gitlab/embedded/lib/python3.4/distutils/sysconfig.py", line 449, in _init_posix
raise DistutilsPlatformError(my_msg)
distutils.errors.DistutilsPlatformError: invalid Python installation: unable to open /opt/gitlab/embedded/include/python3.4m/pyconfig.h (No such file or directory)
ERROR: Job failed: exit status 1
It seems that some files in /opt/gitlab/embedded/include/
are missing.
What I have tested
So I have looked around and found out that the whole folder /opt/gitlab/embedded/include/
is removed after version 10.6.5. When I add the folder in version 10.7.4 it seem to work again.
So my question is:
Is this a feature? (I found nothing helpful in the changelog)
Is this a bug? (I found nothing helpful in the issue tracker)
Is it a configuration problem? (bundle exec rake RAILS_ENV=production
or similar healthcheck shows no problems regarding configuration)
Any help is appreciated
Even a redirect to a more suitable category or forum.
Additional info:
Gitlab runs on a Ubuntu 16.04.4 LTS Server
with gitlab-runner version 10.8.0