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

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

Related

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)

Can't install docker-compose into jenkins dockerfile

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

Preparing wheel metadata ... error ERROR: Command errored out with exit status 1 while installing apex

what i am doing
pip install apex
what error it is showing-
Collecting apex
Using cached apex-0.9.10dev.tar.gz (36 kB)
Collecting cryptacular
Using cached cryptacular-1.5.5.tar.gz (39 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\lenovo\anaconda3\new_folder\python.exe' 'c:\users\lenovo\anaconda3\new_folder\lib\site-packages\pip\_
vendor\pep517\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\Lenovo\AppData\Local\Temp\tmpgjm4o5t7'
cwd: C:\Users\Lenovo\AppData\Local\Temp\pip-install-ngmptthv\cryptacular
Complete output (52 lines):
i am struggling the same error with dataclasses==0.8 please somebody help me out.
The correct way to install apex :
git clone https://github.com/NVIDIA/apex
cd apex
pip3 setup.py install
# or
pip3 install -v --disable-pip-version-check --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./

Error in installing pip package auto-py-to-exe

I am trying to install auto-py-to-exe. In fact, I installed it but a months ago, I reinstalled my windows 10. After that, I am continuously trying to install auto-py-to-exe. Whenever I type pip install auto-py-to-exe in command prompt this output comes out
Collecting auto-py-to-exe
Using cached auto_py_to_exe-2.7.11-py2.py3-none-any.whl (75 kB)
Collecting Eel==0.12.4
Using cached Eel-0.12.4.tar.gz (15 kB)
Collecting pyinstaller>=4.1
Using cached pyinstaller-4.1.tar.gz (3.5 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Collecting bottle
Using cached bottle-0.12.19-py3-none-any.whl (89 kB)
Collecting bottle-websocket
Using cached bottle-websocket-0.2.9.tar.gz (2.0 kB)
Collecting future
Using cached future-0.18.2.tar.gz (829 kB)
Collecting whichcraft
Using cached whichcraft-0.6.1-py2.py3-none-any.whl (5.2 kB)
Collecting pyinstaller-hooks-contrib>=2020.6
Using cached pyinstaller_hooks_contrib-2020.11-py2.py3-none-any.whl (172 kB)
Collecting altgraph
Using cached altgraph-0.17-py2.py3-none-any.whl (21 kB)
Requirement already satisfied: setuptools in c:\users\mniza\appdata\local\programs\python\python39\lib\site-packages (from pyinstaller>=4.1->auto-py-to-exe) (49.2.1)
Collecting pywin32-ctypes>=0.2.0; sys_platform == "win32"
Using cached pywin32_ctypes-0.2.0-py2.py3-none-any.whl (28 kB)
Collecting pefile>=2017.8.1; sys_platform == "win32"
Using cached pefile-2019.4.18.tar.gz (62 kB)
Collecting gevent-websocket
Using cached gevent_websocket-0.10.1-py3-none-any.whl (22 kB)
Collecting gevent
Using cached gevent-20.12.1.tar.gz (5.9 MB)
Installing build dependencies ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\mniza\appdata\local\programs\python\python39\python.exe' 'c:\users\mniza\appdata\local\programs\python\python39\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\mniza\AppData\Local\Temp\pip-build-env-hh9ixh_9\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools >= 40.8.0' wheel 'Cython >= 3.0a5' 'cffi >= 1.12.3 ; platform_python_implementation == '"'"'CPython'"'"'' 'greenlet >= 0.4.17, < 2.0 ; platform_python_implementation == '"'"'CPython'"'"''
cwd: None
Complete output (29 lines):
Collecting setuptools>=40.8.0
Using cached setuptools-51.1.1-py3-none-any.whl (2.0 MB)
Collecting wheel
Using cached wheel-0.36.2-py2.py3-none-any.whl (35 kB)
Collecting Cython>=3.0a5
Using cached Cython-3.0a6-py2.py3-none-any.whl (1.0 MB)
Collecting cffi>=1.12.3
Using cached cffi-1.14.4-cp39-cp39-win_amd64.whl (179 kB)
Collecting greenlet<2.0,>=0.4.17
Using cached greenlet-0.4.17.tar.gz (61 kB)
Collecting pycparser
Using cached pycparser-2.20-py2.py3-none-any.whl (112 kB)
Using legacy 'setup.py install' for greenlet, since package 'wheel' is not installed.
Installing collected packages: setuptools, wheel, Cython, pycparser, cffi, greenlet
Running setup.py install for greenlet: started
Running setup.py install for greenlet: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: 'c:\users\mniza\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\mniza\\AppData\\Local\\Temp\\pip-install-c3p25el7\\greenlet\\setup.py'"'"'; __file__='"'"'C:\\Users\\mniza\\AppData\\Local\\Temp\\pip-install-c3p25el7\\greenlet\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\mniza\AppData\Local\Temp\pip-record-sq3sf8sv\install-record.txt' --single-version-externally-managed --prefix 'C:\Users\mniza\AppData\Local\Temp\pip-build-env-hh9ixh_9\overlay' --compile --install-headers 'C:\Users\mniza\AppData\Local\Temp\pip-build-env-hh9ixh_9\overlay\Include\greenlet'
cwd: C:\Users\mniza\AppData\Local\Temp\pip-install-c3p25el7\greenlet\
Complete output (5 lines):
running install
running build
running build_ext
building 'greenlet' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\mniza\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\mniza\\AppData\\Local\\Temp\\pip-install-c3p25el7\\greenlet\\setup.py'"'"'; __file__='"'"'C:\\Users\\mniza\\AppData\\Local\\Temp\\pip-install-c3p25el7\\greenlet\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\mniza\AppData\Local\Temp\pip-record-sq3sf8sv\install-record.txt' --single-version-externally-managed --prefix 'C:\Users\mniza\AppData\Local\Temp\pip-build-env-hh9ixh_9\overlay' --compile --install-headers 'C:\Users\mniza\AppData\Local\Temp\pip-build-env-hh9ixh_9\overlay\Include\greenlet' Check the logs for full command output.
WARNING: You are using pip version 20.2.3; however, version 20.3.3 is available.
You should consider upgrading via the 'c:\users\mniza\appdata\local\programs\python\python39\python.exe -m pip install --upgrade pip' command.
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\mniza\appdata\local\programs\python\python39\python.exe' 'c:\users\mniza\appdata\local\programs\python\python39\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\mniza\AppData\Local\Temp\pip-build-env-hh9ixh_9\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools >= 40.8.0' wheel 'Cython >= 3.0a5' 'cffi >= 1.12.3 ; platform_python_implementation == '"'"'CPython'"'"'' 'greenlet >= 0.4.17, < 2.0 ; platform_python_implementation == '"'"'CPython'"'"'' Check the logs for full command output.
WARNING: You are using pip version 20.2.3; however, version 20.3.3 is available.
You should consider upgrading via the 'c:\users\mniza\appdata\local\programs\python\python39\python.exe -m pip install --upgrade pip' command.
I assume that there is something wrong with Microsoft Visual C++ as I can see in the error
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
But when I try to install Microsoft Visual C++ I see this window error in installing Microsoft Visual C++ 14.0 (picture)
I again checked the program list and I am a little bit confused which one should I uninstall and which one should I keep program list (picture). Overall I am stuck in this issue for more than three weeks and I will be grateful if anyone can solve this issue.
At last, I have figured out what is the problem. First I have to install a suitable wheel file of greenlet from https://www.lfd.uci.edu/~gohlke/pythonlibs/#greenlet. And then open the command prompt in the directory of the wheel file. Then type
pip install (filename)
After that, again download the wheel file of gevent from https://www.lfd.uci.edu/~gohlke/pythonlibs/#gevent. As before open command prompt in the directory of the wheel file and type pip install (filename) again.
After all of this, type pip install auto-py-to-exe
Hope this will to you as it worked to me!

Building python pypi wheels, the usual nightmare [duplicate]

This question already has answers here:
Pip install from pypi works, but from testpypi fails (cannot find requirements)
(2 answers)
Closed 2 years ago.
I'm trying to build a package and upload it to pypi, I get past that point and the upload is successful, let me walk you through what I'm doing:
setup.py:
from setuptools import setup, find_packages
setup(
name='project_name',
version='1.0',
packages=find_packages(),
url='url',
license='license',
author='author',
author_email='email_here#some_mail.com',
description='description',
install_requires=[
'oauth2client',
'pyarrow',
'pandas',
'requests',
'gcloud'
],
)
I do:
% python3 setup.py sdist bdist_wheel
followed by
% python3 -m twine upload -u username -p password --repository-url https://test.pypi.org/legacy/ dist/*
both run perfectly fine, no errors / warnings ...
Then I get a url which contains:
% pip install -i https://test.pypi.org/simple/ project_name==1.0
So I create a virtualenv environment and try to install:
% virtualenv test_env
% source test_env/bin/activate
% pip install -i https://test.pypi.org/simple/ project_name==1.0
For some reason I get this at first:
ERROR: Could not find a version that satisfies the requirement gcloud (from project_name==1.0) (from versions: none)
ERROR: No matching distribution found for gcloud (from project_name==1.0)
Then I get something else after retrying (no changes applied) to run the last command and I get other results as well. So ... what's wrong?
simple/ project_name==1.0
Looking in indexes: https://test.pypi.org/simple/
Collecting project_name==1.0
Downloading https://test-files.pythonhosted.org/packages/08/38/b040820ceddc63a87596a5a29ce3a5d1b309555238d7ae063835e8c8ea8a/project_name-1.0-py3-none-any.whl (9.1 kB)
Collecting pyarrow
Downloading https://test-files.pythonhosted.org/packages/c1/82/04249512513b31d7cd9f6fa63cf0d1c64c4705da32e3c3ece9d676e235ff/pyarrow-1.0.1.tar.gz (1.3 MB)
|████████████████████████████████| 1.3 MB 594 kB/s
Installing build dependencies ... error
ERROR: Command errored out with exit status 1:
command: /Users/username/Desktop/testenv/bin/python /Users/username/Desktop/testenv/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/rp/xxjnjsvn70g2ndh68l0g10bh0000gn/T/pip-build-env-cnc0ds0l/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://test.pypi.org/simple/ -- 'cython >= 0.29' 'numpy==1.14.5; python_version<'"'"'3.7'"'"'' 'numpy==1.16.0; python_version>='"'"'3.7'"'"'' setuptools setuptools_scm wheel
cwd: None
Complete output (4 lines):
Looking in indexes: https://test.pypi.org/simple/
Ignoring numpy: markers 'python_version < "3.7"' don't match your environment
ERROR: Could not find a version that satisfies the requirement cython>=0.29 (from versions: 0.23.4)
ERROR: No matching distribution found for cython>=0.29
----------------------------------------
ERROR: Command errored out with exit status 1: /Users/username/Desktop/testenv/bin/python /Users/username/Desktop/testenv/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/rp/xxjnjsvn70g2ndh68l0g10bh0000gn/T/pip-build-env-cnc0ds0l/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://test.pypi.org/simple/ -- 'cython >= 0.29' 'numpy==1.14.5; python_version<'"'"'3.7'"'"'' 'numpy==1.16.0; python_version>='"'"'3.7'"'"'' setuptools setuptools_scm wheel Check the logs for full command output.
Note: The package is fine, I'm able to install it on my system interpreter (python3.8) of my mbp but that is because all the dependencies numpy, gcloud ... are already installed.
I think this is because pip is looking for the package dependancies in https://test.pypi.org/simple/ where they don't exist.
Try:
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple your-package
This will pull your package from test.pypi but then fall back on regular pypi when pip fails to find the dependancies there.

Categories