Can't install docker-compose into jenkins dockerfile - python

I try to install docker-compose into docker-container but it fails to build.
Here's my dockerfile:
FROM jenkinsci/blueocean
USER root
RUN apk add --no-cache py-pip python3-dev libffi-dev openssl-dev gcc libc-dev rust cargo make gettext
RUN pip3 install docker-compose
USER jenkins
And it shows me an error:
Building wheels for collected packages: bcrypt, cryptography, pynacl, pyrsistent, PyYAML
Building wheel for bcrypt (PEP 517): started
Building wheel for bcrypt (PEP 517): finished with status 'done'
Created wheel for bcrypt: filename=bcrypt-3.2.0-cp39-cp39-linux_x86_64.whl size=64287 sha256=4d90a6bcaa110ba58a48889ded4adb0f92fa7966ea45a8abeea0ad6f8a94004f
Stored in directory: /root/.cache/pip/wheels/9a/0b/a2/2c559982bbee4bd184557267e5760e114de3e9ba826fe8d691
Building wheel for cryptography (PEP 517): started
Building wheel for cryptography (PEP 517): still running...
Building wheel for cryptography (PEP 517): finished with status 'done'
Created wheel for cryptography: filename=cryptography-3.4.8-cp39-cp39-linux_x86_64.whl size=1360638 sha256=ef093594bbb07d34bc6de28f7447a6c257813cda8e83f5254c42d01b602351da
Stored in directory: /root/.cache/pip/wheels/28/ea/c2/e48100a4f4674263f982c899942ed5225966b37b47e9b631f6
Building wheel for pynacl (PEP 517): started
Building wheel for pynacl (PEP 517): finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 /usr/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /tmp/tmpi_pcnqvb
cwd: /tmp/pip-install-w50jx1wy/pynacl_e9c31de258254c47941580c85da83563
Complete output (322 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.9
creating build/lib.linux-x86_64-3.9/nacl
....
subprocess.CalledProcessError: Command '['make']' returned non-zero exit status 2.
ERROR: Failed building wheel for pynacl
Building wheel for pyrsistent (PEP 517): started
Building wheel for pyrsistent (PEP 517): finished with status 'done'
Created wheel for pyrsistent: filename=pyrsistent-0.18.0-cp39-cp39-linux_x86_64.whl size=115732 sha256=24c93c9e75844cd86f8fee6965a97c1e7068c5042b7745085d612c047cf23103
Stored in directory: /root/.cache/pip/wheels/dd/c8/61/04c6d218b3691f75353d7f74fed3fbd40e0ee9e2d1e2ce24c6
Building wheel for PyYAML (PEP 517): started
Building wheel for PyYAML (PEP 517): finished with status 'done'
Created wheel for PyYAML: filename=PyYAML-5.4.1-cp39-cp39-linux_x86_64.whl size=45654 sha256=231652b88a0bcee5f8b831941b4bf38a80d8815a54474f798a482a128047402b
Stored in directory: /root/.cache/pip/wheels/b7/a5/c4/504d913c2a55bb09c607541578ec5f844d1ff33467abe93ba5
Successfully built bcrypt cryptography pyrsistent PyYAML
Failed to build pynacl
ERROR: Could not build wheels for pynacl which use PEP 517 and cannot be installed directly
ERROR: Service 'jenkins' failed to build: The command '/bin/sh -c apk add --no-cache py-pip python3-dev libffi-dev openssl-dev gcc libc-dev rust cargo make gettext && pip3 install docker-compose' returned a non-zero code: 1
I was trying to upgrade/downgrade the pip but it stays the same. Please, help.

I changed my dockerfile and it's working now. https://wiki.alpinelinux.org/wiki/Docker
FROM jenkinsci/blueocean
USER root
RUN apk add --no-cache docker-compose
USER jenkins

Related

How to resolve error, "legacy-install-failure" when installing package pysha3 in PyCharm using python 3.11 on windows?

I'm pretty new to programming in python, and the reason why I am using or have been learning python as of now is to complete an assignment. However, when downloading a source code and attempting to use it, I encountered errors that I cannot resolve. The source code is from this website "https://github.com/ZeroProphet/klefki#readme. If anyone can help me with this problem, that would be great.
I tried updating the pip version and even doing a specific step-by-step installation of the package in PyCharm. I expect it to be downloaded successfully, but it keeps stating that it cannot build the wheel for pysha3 and legacy-install-failure. If anything, try running this program and see if you're experiencing similar issues.
This error is shown when I attempt to run the program:
Collecting pyasn1==0.3.7
Using cached pyasn1-0.3.7-py2.py3-none-any.whl (63 kB)
Collecting base58==0.2.5
Using cached base58-0.2.5-py3-none-any.whl (4.1 kB)
Collecting asn1ate==0.6.0
Using cached asn1ate-0.6.0-py3-none-any.whl (29 kB)
Collecting pysha3==1.0.2
Using cached pysha3-1.0.2.tar.gz (829 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Collecting flatbuffers==1.12
Using cached flatbuffers-1.12-py2.py3-none-any.whl (15 kB)
Collecting pyparsing>=2.0.0
Using cached pyparsing-3.0.9-py3-none-any.whl (98 kB)
Building wheels for collected packages: pysha3
Building wheel for pysha3 (setup.py): started
Building wheel for pysha3 (setup.py): finished with status 'error'
Running setup.py clean for pysha3
Failed to build pysha3
Installing collected packages: pysha3, pyasn1, flatbuffers, base58, pyparsing, asn1ate
Running setup.py install for pysha3: started
Running setup.py install for pysha3: finished with status 'error'
error: subprocess-exited-with-error
python setup.py bdist_wheel did not run successfully.
exit code: 1
[9 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-311
copying sha3.py -> build\lib.win-amd64-cpython-311
running build_ext
building '_pysha3' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pysha3
**error: subprocess-exited-with-error**
Running setup.py install for pysha3 did not run successfully.
exit code: 1
[11 lines of output]
running install
C:\Users\sxmfc\Downloads\klefki-master\venv\Lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-311
copying sha3.py -> build\lib.win-amd64-cpython-311
running build_ext
building '_pysha3' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
**error: legacy-install-failure**
Encountered error while trying to install package.
pysha3
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.```

Unable to install mysqlclient using pycharm

unable to find the fix for it. Here is the output from the console. I have tried using different python interpreters and also downloaded mysql
pip
The following command was executed:
pip install mysqlclient==2.1.0
The exit code: 1
The error output of the command:
Collecting mysqlclient==2.1.0
Using cached mysqlclient-2.1.0.tar.gz (87 kB)
Building wheels for collected packages: mysqlclient
Building wheel for mysqlclient (setup.py): started
Building wheel for mysqlclient (setup.py): finished with status 'error'
Running setup.py clean for mysqlclient
Failed to build mysqlclient
Installing collected packages: mysqlclient
Running setup.py install for mysqlclient: started
Running setup.py install for mysqlclient: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: 'D:\Nutrition\Source Code\context\venv\Scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\gunot\\AppData\\Local\\Temp\\pip-install-4xfatye_\\mysqlclient_5cf00f5723004ef1a4f6fe1a1f9673d1\\setup.py'"'"'; __file__='"'"'C:\\Users\\gunot\\AppData\\Local\\Temp\\pip-install-4xfa... (show balloon)

How do I install stemmer package in python

I'm running jupyter using python 3.9.7. I need to use stemmer package. So I wrote following command
!pip install PyStemmer
But I'm getting following message & stemmer is not installing
Collecting PyStemmer
Downloading PyStemmer-2.0.1.tar.gz (559 kB)
Building wheels for collected packages: PyStemmer
Building wheel for PyStemmer (setup.py): started
Building wheel for PyStemmer (setup.py): finished with status 'error'
Running setup.py clean for PyStemmer
Failed to build PyStemmer
Installing collected packages: PyStemmer
Running setup.py install for PyStemmer: started
Running setup.py install for PyStemmer: finished with status 'error'
Can you help me to install stemmer?

Unable to install hunspell on windows 10

i am unable to install hunspell on windows 10
whenever i try to install it using pip it throws the following error.
Building wheel for hunspell (setup.py) ... error
ERROR: Command errored out with exit status 1:
command:
Complete output (12 lines):
running bdist_wheel
running build
running build_ext
building 'hunspell' extension
creating build
creating build\temp.win-amd64-3.7
creating build\temp.win-amd64-3.7\Release
C:\Program Files (x86)\Microsoft Visual
----------------------------------------
ERROR: Failed building wheel for hunspell
Running setup.py clean for hunspell
Failed to build hunspell
Installing collected packages: hunspell
Running setup.py install for hunspell ... error
ERROR: Command errored out with exit status 1:
Tried this ?
pip install CyHunspell
See https://github.com/OpenGov/cython_hunspell.

Failed to install PyGObject with Python3.6 in Raspberry Pi 3

I've manually installed Python3.6 in Raspberry Pi3. I'm trying to install PyGObject which fails with the error:
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python3.6 /usr/local/lib/python3.6/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-f4i084p_/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple --extra-index-url https://www.piwheels.org/simple -- setuptools wheel pycairo
cwd: None
Complete output (36 lines):
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple, https://www.piwheels.org/simple
Collecting setuptools
Downloading setuptools-50.3.2-py3-none-any.whl (785 kB)
Collecting wheel
Downloading wheel-0.35.1-py2.py3-none-any.whl (33 kB)
Collecting pycairo
Downloading pycairo-1.20.0.tar.gz (344 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing wheel metadata: started
Preparing wheel metadata: finished with status 'done'
Building wheels for collected packages: pycairo
Building wheel for pycairo (PEP 517): started
Building wheel for pycairo (PEP 517): finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python3.6 /usr/local/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /tmp/tmpazwu2ueb
cwd: /tmp/pip-install-k30bx276/pycairo
Complete output (12 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-armv7l-3.6
creating build/lib.linux-armv7l-3.6/cairo
copying cairo/__init__.py -> build/lib.linux-armv7l-3.6/cairo
copying cairo/__init__.pyi -> build/lib.linux-armv7l-3.6/cairo
copying cairo/py.typed -> build/lib.linux-armv7l-3.6/cairo
running build_ext
Requested 'cairo >= 1.15.10' but version of cairo is 1.14.8
Command '['pkg-config', '--print-errors', '--exists', 'cairo >= 1.15.10']' returned non-zero exit status 1.
----------------------------------------
ERROR: Failed building wheel for pycairo
Failed to build pycairo
ERROR: Could not build wheels for pycairo which use PEP 517 and cannot be installed directly
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/bin/python3.6 /usr/local/lib/python3.6/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-f4i084p_/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple --extra-index-url https://www.piwheels.org/simple -- setuptools wheel pycairo Check the logs for full command output.
As per my understanding, the failure occurs while building PyCairo-1.20.0 which needs cairo >= 1.15.10' but version of cairo is 1.14.8.
Possible solution:
pycairo-1.20.0 is a recent release (5 Oct 2020).
If the build uses pycairo-1.19.1, I believe the installation will succeed as it needs cairo >= 1.13.1.
So, my question is:
Disregarding my "possible solution", is there any way to install PyGObject using pip3 for python3.6 in Raspberry Pi 3?
With respect to my "possible solution", how to install PyGObject that uses PyCairo-1.19.1 ?
The command I executed is:
sudo PYGOBJECT_WITHOUT_PYCAIRO=1 pip3 install --no-build-isolation --no-use-pep517 pygobject
which installs PyGObject without installing PyCairo.
https://github.com/pygobject/pycairo/issues/219

Categories