problem while installing gnuhealth client on centos 7 - python

when i run the command ;
pip3 install --user --upgrade gnuhealth-client
it shows the same error msg everytime
gnuhealth#ghealth:~ $ pip3 install --user --upgrade gnuhealth-client
Collecting gnuhealth-client
Using cached gnuhealth-client-3.6.9.tar.gz (700 kB)
Collecting pycairo
Using cached pycairo-1.19.1.tar.gz (205 kB)
Requirement already satisfied, skipping upgrade: python-dateutil in ./.local/lib/python3.6/site-packages (from gnuhealth-client) (2.8.1)
Collecting PyGObject
Using cached PyGObject-3.36.1.tar.gz (716 kB)
Installing build dependencies ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 /home/gnuhealth/.local/lib/python3.6/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-w04za2un/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel pycairo
cwd: None
Complete output (31 lines):
Collecting setuptools
Using cached setuptools-49.6.0-py3-none-any.whl (803 kB)
Collecting wheel
Using cached wheel-0.35.1-py2.py3-none-any.whl (33 kB)
Collecting pycairo
Using cached pycairo-1.19.1.tar.gz (205 kB)
Using legacy 'setup.py install' for pycairo, since package 'wheel' is not installed.
Installing collected packages: setuptools, wheel, pycairo
Running setup.py install for pycairo: started
Running setup.py install for pycairo: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ax6ip1o2/pycairo/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ax6ip1o2/pycairo/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-2p1yavr2/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-w04za2un/overlay --compile --install-headers /tmp/pip-build-env-w04za2un/overlay/include/python3.6m/pycairo
cwd: /tmp/pip-install-ax6ip1o2/pycairo/
Complete output (15 lines):
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/cairo
copying cairo/__init__.py -> build/lib.linux-x86_64-3.6/cairo
copying cairo/__init__.pyi -> build/lib.linux-x86_64-3.6/cairo
copying cairo/py.typed -> build/lib.linux-x86_64-3.6/cairo
running build_ext
Package cairo was not found in the pkg-config search path.
Perhaps you should add the directory containing `cairo.pc'
to the PKG_CONFIG_PATH environment variable
No package 'cairo' found
Command '['pkg-config', '--print-errors', '--exists', 'cairo >= 1.13.1']' returned non-zero exit status 1.
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ax6ip1o2/pycairo/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ax6ip1o2/pycairo/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-2p1yavr2/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-w04za2un/overlay --compile --install-headers /tmp/pip-build-env-w04za2un/overlay/include/python3.6m/pycairo Check the logs for full command output.
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 /home/gnuhealth/.local/lib/python3.6/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-w04za2un/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel pycairo Check the logs for full command output.
what should i do ?

UPDATED ANSWER
It's PyGObject that is failing
try
sudo yum install gcc gobject-introspection-devel cairo-devel pkg-config python3-devel gtk3 cairo-gobject-devel
export PKG_CONFIG_PATH=/usr/lib64/pkgconfig
before attempting the pip install
This actually worked for me on Centos7

Related

Error When Using Pip To Get Python Packages On Linux Terminal

When I try to install a python package (cryptography in this case) in the Linux terminal, I get an error. I am using Python version 3.8. Here's the code:
Input:
python3.8 -m pip install cryptography or pip install cryptography
Output (anything after "Installing build dependencies ... error" is in RED):
Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting cryptography
Using cached cryptography-36.0.1.tar.gz (572 kB)
Installing build dependencies ... error
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python3.8
/usr/local/lib/python3.8/site-packages/pip install --ignore-installed
--no-user --prefix /tmp/pip-build-env-j3i9og4s/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>=40.6.0' wheel
'cffi>=1.12; platform_python_implementation != '"'"'PyPy'"'"''
'setuptools-rust>=0.11.4'
cwd: None
Complete output (26 lines):
Looking in indexes: https://pypi.org/simple,
https://www.piwheels.org/simple, https://www.piwheels.org/simple
Collecting setuptools>=40.6.0
Using cached setuptools-60.9.3-py3-none-any.whl (1.1 MB)
Collecting wheel
Using cached wheel-0.37.1-py2.py3-none-any.whl (35 kB)
Collecting cffi>=1.12
Using cached cffi-1.15.0.tar.gz (484 kB)
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python3.8 -c 'import sys, setuptools,
tokenize; sys.argv[0] =
'"'"'/tmp/pip-install-9sokml3p/cffi/setup.py'"'"';
__file__='"'"'/tmp/pip-install-9sokml3p/cffi/setup.py'"'"';f=getattr(tokenize,
'"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"',
'"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))'
egg_info --egg-base /tmp/pip-pip-egg-info-5ylb3zxi
cwd: /tmp/pip-install-9sokml3p/cffi/
Complete output (11 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/local/lib/python3.8/site-packages/setuptools/__init__.py",
line 19, in <module>
from setuptools.dist import Distribution
File "/usr/local/lib/python3.8/site-packages/setuptools/dist.py",
line 34, in <module>
from setuptools import windows_support
File "/usr/local/lib/python3.8/site-packages/setuptools/windows_support.py",
line 2, in <module>
import ctypes
File "/usr/local/lib/python3.8/ctypes/__init__.py", line 7, in <module>
from _ctypes import Union, Structure, Array
ModuleNotFoundError: No module named '_ctypes'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py
egg_info Check the logs for full command output.
WARNING: You are using pip version 20.1.1; however, version 22.0.3
is available.
You should consider upgrading via the '/usr/local/bin/python3.8 -m
pip install --upgrade pip' command.
----------------------------------------
ERROR: Command errored out with exit status 1:
/usr/local/bin/python3.8 /usr/local/lib/python3.8/site-packages/pip
install --ignore-installed --no-user --prefix
/tmp/pip-build-env-j3i9og4s/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>=40.6.0' wheel 'cffi>=1.12; platform_python_implementation
!= '"'"'PyPy'"'"'' 'setuptools-rust>=0.11.4' Check the logs for full
command output.
I don't really understand what this means, and I'd like some assistance installing a package and trying to fix this error. Thanks! -Shane
EDIT: I found near the beginning the text 'Command errored out with exit status 1'
EDIT: I have installed libffi-dev.
Solved by upgrading pip to pip3 using sudo apt-get -y install python3-pip.
Looks like you may need to install libffi-dev. I'm not sure your distro, but it'll be there. Distro is raspbian.
Install with:
apt-get install libffi-dev
There are other questions that looks similar since they have the _ctypes issue, but I won't mark this as a duplicate since your question is exactly the same. I think the underlying root cause is probably the same. See here and here.

install llvmlite and numba library for python2 on jetson xavier nx

I want to install numba and llvmlite for python2 on jetson. However there seems to be no documentation on the same. Everything is for python3. I am trying to run a program on ros melodic and hence need the libraries in python2.
When i try
python2.7 -m pip install numba==0.45
I am getting following error
Collecting numba==0.45
Downloading https://files.pythonhosted.org/packages/7e/89/853a1f03b09f1b13b59c3d785678b47daac6ddd24a285f146d09bb723b85/numba-0.45.0.tar.gz (1.8MB)
100% |████████████████████████████████| 1.8MB 328kB/s
Collecting llvmlite>=0.29.0dev0 (from numba==0.45)
Using cached https://files.pythonhosted.org/packages/50/cc/04526507e80d546be5688ce0246e40277b61e7949c3347c6609b6a4154cf/llvmlite-0.32.1.tar.gz
Collecting numpy (from numba==0.45)
Collecting funcsigs (from numba==0.45)
Using cached https://files.pythonhosted.org/packages/69/cb/f5be453359271714c01b9bd06126eaf2e368f1fddfff30818754b5ac2328/funcsigs-1.0.2-py2.py3-none-any.whl
Collecting enum34 (from numba==0.45)
Using cached https://files.pythonhosted.org/packages/6f/2c/a9386903ece2ea85e9807e0e062174dc26fdce8b05f216d00491be29fad5/enum34-1.1.10-py2-none-any.whl
Collecting singledispatch (from numba==0.45)
Using cached https://files.pythonhosted.org/packages/cd/d1/6a9e922826e03f5af7bf348cfb75bcb0bc4c67e19c36805c2545f34427e5/singledispatch-3.6.2-py2.py3-none-any.whl
Collecting six (from singledispatch->numba==0.45)
Using cached https://files.pythonhosted.org/packages/d9/5a/e7c31adbe875f2abbb91bd84cf2dc52d792b5a01506781dbcf25c91daf11/six-1.16.0-py2.py3-none-any.whl
Building wheels for collected packages: numba, llvmlite
Running setup.py bdist_wheel for numba ... done
Stored in directory: /home/nvidia/.cache/pip/wheels/51/5d/c0/420ea2fced22bb1702a294c2cbc0dcaefd6ed61f3d6253fd61
Running setup.py bdist_wheel for llvmlite ... error
Complete output from command /usr/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-ni4NGO/llvmlite/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpwjzE5mpip-wheel- --python-tag cp27:
running bdist_wheel
/usr/bin/python2.7 /tmp/pip-build-ni4NGO/llvmlite/ffi/build.py
File "/tmp/pip-build-ni4NGO/llvmlite/ffi/build.py", line 122
raise ValueError(msg.format(_ver_check_skip)) from e
^
SyntaxError: invalid syntax
error: command '/usr/bin/python2.7' failed with exit status 1
----------------------------------------
Failed building wheel for llvmlite
Running setup.py clean for llvmlite
Successfully built numba
Failed to build llvmlite
Installing collected packages: llvmlite, numpy, funcsigs, enum34, six, singledispatch, numba
Running setup.py install for llvmlite ... error
Complete output from command /usr/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-ni4NGO/llvmlite/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-XAdkTG-record/install-record.txt --single-version-externally-managed --compile --user --prefix=:
running install
running build
got version from file /tmp/pip-build-ni4NGO/llvmlite/llvmlite/_version.py {'version': '0.32.1', 'full': 'aa11b129c0b55973067422397821ae6d44fa5e70'}
running build_ext
/usr/bin/python2.7 /tmp/pip-build-ni4NGO/llvmlite/ffi/build.py
File "/tmp/pip-build-ni4NGO/llvmlite/ffi/build.py", line 122
raise ValueError(msg.format(_ver_check_skip)) from e
^
SyntaxError: invalid syntax
error: command '/usr/bin/python2.7' failed with exit status 1
----------------------------------------
Command "/usr/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-ni4NGO/llvmlite/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-XAdkTG-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-ni4NGO/llvmlite/
I solved it.
What worked for me was
sudo apt-get install python-numba
Try to upgrade pip and install the latest versions that support Python 2.7:
python2.7 -m pip install -U "pip < 21.0"
python2.7 -m pip install "llvmlite < 0.32.1" "numba < 0.46"

Failed to build gcld3 in Google Colab and Anaconda

I typed the command:
!pip install gcld3
It shows following error:
Collecting gcld3
Using cached https://files.pythonhosted.org/packages/3a/73/72e469743a7e299e9a074857f7cac9f2b045bd495e20fdbd75cf081277c3/gcld3-3.0.13.tar.gz
Building wheels for collected packages: gcld3
Building wheel for gcld3 (setup.py) ... error
ERROR: Failed building wheel for gcld3
Running setup.py clean for gcld3
Failed to build gcld3
Installing collected packages: gcld3
Running setup.py install for gcld3 ... error
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-_lhh_qx8/gcld3/setup.py'"'"'; __file__='"'"'/tmp/pip-install-_lhh_qx8/gcld3/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-1iqkv3v8/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.
I have tried to find the *.whl file for gcld3, but I couldn't find it.

Error while performing pip install open_excel

pip install open_excel
Collecting open_excel Using cached open_excel-0.101a0.tar.gz (6.5 kB) Requirement already satisfied: openpyxl in /usr/lib/python2.7/site-packages (from open_excel) (2.6.4) Requirement already satisfied: jdcal in /usr/lib/python2.7/site-packages (from openpyxl->open_excel) (1.4.1) Requirement already satisfied: et_xmlfile in /usr/lib/python2.7/site-packages (from openpyxl->open_excel) (1.0.1) Building wheels for collected packages: open-excel Building wheel for open-excel (setup.py) ... error ERROR: Command errored out with exit status 1: command: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-UB5LPQ/open-excel/setup.py'"'"';
__file__='"'"'/tmp/pip-install-UB5LPQ/open-excel/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-nyWtv9
cwd: /tmp/pip-install-UB5LPQ/open-excel/ Complete output (14 lines): /usr/lib/python2.7/site-packages/setuptools/dist.py:476: UserWarning: Normalizing '0.101a' to '0.101a0'
normalized_version, running bdist_wheel running build running build_py creating build creating build/lib creating build/lib/open_excel copying open_excel/__init__.py -> build/lib/open_excel copying open_excel/open_excel.py -> build/lib/open_excel copying open_excel/search_excel.py -> build/lib/open_excel running build_scripts creating build/scripts-2.7 error: open_excel: Is a directory
---------------------------------------- ERROR: Failed building wheel for open-excel Running setup.py clean for open-excel Failed to build open-excel Installing collected packages: open-excel
Running setup.py install for open-excel ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-UB5LPQ/open-excel/setup.py'"'"';
__file__='"'"'/tmp/pip-install-UB5LPQ/open-excel/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-nTesj4/install-record.txt
--single-version-externally-managed --compile --install-headers /usr/include/python2.7/open-excel
cwd: /tmp/pip-install-UB5LPQ/open-excel/
Complete output (14 lines):
/usr/lib/python2.7/site-packages/setuptools/dist.py:476: UserWarning: Normalizing '0.101a' to '0.101a0'
normalized_version,
running install
running build
running build_py
creating build
creating build/lib
creating build/lib/open_excel
copying open_excel/__init__.py -> build/lib/open_excel
copying open_excel/open_excel.py -> build/lib/open_excel
copying open_excel/search_excel.py -> build/lib/open_excel
running build_scripts
creating build/scripts-2.7
error: open_excel: Is a directory
---------------------------------------- ERROR: Command errored out with exit status 1: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-UB5LPQ/open-excel/setup.py'"'"';
__file__='"'"'/tmp/pip-install-UB5LPQ/open-excel/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-nTesj4/install-record.txt
--single-version-externally-managed --compile --install-headers /usr/include/python2.7/open-excel Check the logs for full command output.
That install seems to be buggy. It uses openpyxl, so you'll want to update yours from (2.6.4) to (3.0.5)
https://openpyxl.readthedocs.io/en/stable
Pick whichever one works for your OS:
pip install -U openpyxl
pip3 install -U openpyxl
python -m pip install -U openpyxl
python3 -m pip install -U openpyxl
py -m pip install -U openpyxl
py -3 -m pip install -U openpyxl
Save his scripts into the dir you are using, or a directory in your PATH, then import them as usual.
https://raw.githubusercontent.com/mohameosam/open_excel/master/open_excel.py
https://raw.githubusercontent.com/mohameosam/open_excel/master/search_excel.py
You can also submit a bug-report on GitHub, to let him know
https://github.com/mohameosam/open_excel/issues

why does installing pygobject is giving error and cannot install further

Im getting below error when installing PyGObject using pip on windows python version 2.7.18
pip install PyGObject
ERROR: Command errored out with exit status 1:
command: 'c:\python27\python.exe' 'c:\python27\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'c:\users\test\appdata\local\temp\pip-build-env-9
qeux4\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel pycairo
cwd: None
Complete output (35 lines):
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support
for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting setuptools
Using cached setuptools-44.1.1-py2.py3-none-any.whl (583 kB)
Collecting wheel
Using cached wheel-0.35.1-py2.py3-none-any.whl (33 kB)
Collecting pycairo
Using cached pycairo-1.18.2.tar.gz (200 kB)
Using legacy 'setup.py install' for pycairo, since package 'wheel' is not installed.
Installing collected packages: setuptools, wheel, pycairo
Running setup.py install for pycairo: started
Running setup.py install for pycairo: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: 'c:\python27\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'c:\\users\\test\\appdata\\local\\temp\\pip-install-cp90gz\\pycairo\
\setup.py'"'"'; __file__='"'"'c:\\users\\test\\appdata\\local\\temp\\pip-install-cp90gz\\pycairo\\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\test\appdata\local\temp\pip-record-n
nbplv\install-record.txt' --single-version-externally-managed --prefix 'c:\users\test\appdata\local\temp\pip-build-env-9qeux4\overlay' --compile --install-headers 'c:\u
sers\test\appdata\local\temp\pip-build-env-9qeux4\overlay\Include\pycairo'
cwd: c:\users\test\appdata\local\temp\pip-install-cp90gz\pycairo\
Complete output (18 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-2.7
creating build\lib.win-amd64-2.7\cairo
copying cairo\__init__.py -> build\lib.win-amd64-2.7\cairo
copying cairo\__init__.pyi -> build\lib.win-amd64-2.7\cairo
copying cairo\py.typed -> build\lib.win-amd64-2.7\cairo
running build_ext
building 'cairo._cairo' extension
creating build\temp.win-amd64-2.7
creating build\temp.win-amd64-2.7\Release
creating build\temp.win-amd64-2.7\Release\cairo
C:\Users\test\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DPYCAIRO_VERSION_MAJOR=1
-DPYCAIRO_VERSION_MINOR=18 -DPYCAIRO_VERSION_MICRO=2 -Ic:\python27\include -Ic:\python27\PC /Tccairo/device.c /Fobuild\temp.win-amd64-2.7\Release\cairo/device.obj
device.c
c:\users\test\appdata\local\temp\pip-install-cp90gz\pycairo\cairo\pycairo.h(37) : fatal error C1083: Cannot open include file: 'cairo.h': No such file or director
y
error: command 'C:\\Users\\test\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\python27\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'c:\\users\\test\\appdata\\local\\t
emp\\pip-install-cp90gz\\pycairo\\setup.py'"'"'; __file__='"'"'c:\\users\\test\\appdata\\local\\temp\\pip-install-cp90gz\\pycairo\\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\tes
t\appdata\local\temp\pip-record-nnbplv\install-record.txt' --single-version-externally-managed --prefix 'c:\users\test\appdata\local\temp\pip-build-env-9qeux4\overlay'
--compile --install-headers 'c:\users\test\appdata\local\temp\pip-build-env-9qeux4\overlay\Include\pycairo' Check the logs for full command output.
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\python27\python.exe' 'c:\python27\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'c:\users\test
\appdata\local\temp\pip-build-env-9qeux4\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simplehttps://pypi.org/simple -- setuptools wheel pycai
ro Check the logs for full command output.
You won't be able to install PyGObject like that because MS Visual C is not going to be able to compile it.
If you follow the PyGObject Getting Started in Windows instructions, you should be able to install PyGObject in Windows using MSYS2.
Go to http://www.msys2.org/ and download the x86_64 installer
Follow the instructions on the page for setting up the basic environment
Run C:\msys64\mingw64.exe - a terminal window should pop up
Execute pacman -Suy
Execute pacman -S mingw-w64-x86_64-gtk3 mingw-w64-x86_64-python3 mingw-w64-x86_64-python3-gobject
To test that GTK 3 is working you can run gtk3-demo
Copy the hello.py script you created to C:\msys64\home\<username>
In the mingw64 terminal execute python3 hello.py - a window should appear.

Categories

Resources