I already have Python installed, aswell as PIP & PyObject v 1.0,
but trying to install PyGTK is throwing and error. Will add other relivant questions in a minute.
The given output error is listed below. I am using windows 10 & Hyper CMD from Github.
Microsoft Windows [Version 10.0.19041.508]
(c) 2020 Microsoft Corporation. All rights reserved.
C:\Users\Ryan>cd Desktop
C:\Users\Ryan\Desktop>cd Python
C:\Users\Ryan\Desktop\Python>pip install PyGTK
Collecting PyGTK
Using cached pygtk-2.24.0.tar.bz2 (2.4 MB)
ERROR: Command errored out with exit status 1:
command: 'c:\python38\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Ryan\\AppData\\Local\\Temp\\pip-install-dvq3hehj\\pygtk\\setup.py'"'"'; __file__='"'"'C:\\Users\\Ryan\\AppData\\Local\\Temp\\pip-install-dvq3hehj\\pygtk\\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 'C:\Users\Ryan\AppData\Local\Temp\pip-pip-egg-info-_fc9fnz2'
cwd: C:\Users\Ryan\AppData\Local\Temp\pip-install-dvq3hehj\pygtk\
Complete output (1 lines):
ERROR: Could not import dsextras module: Make sure you have installed pygobject.
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
C:\Users\Ryan\Desktop\Python>pip install pyobject
Collecting pyobject
Downloading pyobject-1.0.tar.gz (12 kB)
Using legacy 'setup.py install' for pyobject, since package 'wheel' is not installed.
Installing collected packages: pyobject
Running setup.py install for pyobject ... done
Successfully installed pyobject-1.0
C:\Users\Ryan\Desktop\Python>pip install pygtk
Collecting pygtk
Using cached pygtk-2.24.0.tar.bz2 (2.4 MB)
ERROR: Command errored out with exit status 1:
command: 'c:\python38\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Ryan\\AppData\\Local\\Temp\\pip-install-qotfp_ry\\pygtk\\setup.py'"'"'; __file__='"'"'C:\\Users\\Ryan\\AppData\\Local\\Temp\\pip-install-qotfp_ry\\pygtk\\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 'C:\Users\Ryan\AppData\Local\Temp\pip-pip-egg-info-p2eqklxp'
cwd: C:\Users\Ryan\AppData\Local\Temp\pip-install-qotfp_ry\pygtk\
Complete output (1 lines):
ERROR: Could not import dsextras module: Make sure you have installed pygobject.
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
C:\Users\Ryan\Desktop\Python>
Possibly related question ::>>
Pip install unroll Python Setup PyEgg
Pip Install PyGTK Error
ReadTheDocs => PygObject
If PyGTK is a python Package then why does it rely on such program as MSYS2 to be installed, and if this does need to be installed why is the terminal not mentioning this as an error or a necessary dependancy?
The given example pictures on the ReadTheDocs Website look like their installing it on a windows system from the 1970's so not sure how upto date that article is. Says Windows 7 and upwards.. I am running Windows 10 Home, Latest Updates...
Ps What are some good alternatives to PyGTK?
are there any that are better for GUI PyGTK alternatives
Not sure which ones in the list to look into has anyone used any of these?
The question that has been sugested as a duplicate is over 3 years old and MSYS2 still does not look like its is up to date or being actively maintained. Also I am using a different version of python.
Looking for a simple way to build GUI on windows, for basic task's and learning.
Related
Currently using Visual Studio Code
Tried using pip install pyaudio but it simply gave an error like:
PS C:\Users\NIKHIL> pip install pyaudio
Defaulting to user installation because normal site-packages is
not writeable
Collecting pyaudio
Using cached PyAudio-0.2.11.tar.gz (37 kB)
Building wheels for collected packages: pyaudio
Building wheel for pyaudio (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\program files\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\NIKHIL\\AppData\\Local\\Temp\\pip-install-yo0mmwlt\\pyaudio_d4ca14ee2a5246debede93cab086f909\\setup.py'"'"'; __file__='"'"'C:\\Users\\NIKHIL\\AppData\\Local\\Temp\\pip-install-yo0mmwlt\\pyaudio_d4ca14ee2a5246debede93cab086f909\\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 'C:\Users\NIKHIL\AppData\Local\Temp\pip-wheel-cbxwzcr9'
cwd: C:\Users\NIKHIL\AppData\Local\Temp\pip-install-yo0mmwlt\pyaudio_d4ca14ee2a5246debede93cab086f909\
Complete output (9 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
copying src\pyaudio.py -> build\lib.win-amd64-3.9
running build_ext
building '_portaudio' 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/
----------------------------------------
ERROR: Failed building wheel for pyaudio
Running setup.py clean for pyaudio
Failed to build pyaudio
Installing collected packages: pyaudio
Running setup.py install for pyaudio ... error
ERROR: Command errored out with exit status 1:
command: 'c:\program files\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\NIKHIL\\AppData\\Local\\Temp\\pip-install-yo0mmwlt\\pyaudio_d4ca14ee2a5246debede93cab086f909\\setup.py'"'"'; __file__='"'"'C:\\Users\\NIKHIL\\AppData\\Local\\Temp\\pip-install-yo0mmwlt\\pyaudio_d4ca14ee2a5246debede93cab086f909\\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\NIKHIL\AppData\Local\Temp\pip-record-u900rrya\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\NIKHIL\AppData\Roaming\Python\Python39\Include\pyaudio'
cwd: C:\Users\NIKHIL\AppData\Local\Temp\pip-install-yo0mmwlt\pyaudio_d4ca14ee2a5246debede93cab086f909\
Complete output (9 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
copying src\pyaudio.py -> build\lib.win-amd64-3.9
running build_ext
building '_portaudio' 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/
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\program files\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\NIKHIL\\AppData\\Local\\Temp\\pip-install-yo0mmwlt\\pyaudio_d4ca14ee2a5246debede93cab086f909\\setup.py'"'"'; __file__='"'"'C:\\Users\\NIKHIL\\AppData\\Local\\Temp\\pip-install-yo0mmwlt\\pyaudio_d4ca14ee2a5246debede93cab086f909\\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\NIKHIL\AppData\Local\Temp\pip-record-u900rrya\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\NIKHIL\AppData\Roaming\Python\Python39\Include\pyaudio' Check the logs for full command
output.
please suggest a way out of this
You can also try to install it with the .whl file.
Find your Python version
64 or 32 bit?
Find the appropriate file here
For example, my Python version is the 3.9 64bit I would download the "PyAudio‑0.2.11‑cp39‑cp39‑win_amd64.whl" file.
Open your CMD and go to the folder where the file is. Ex.: cd C:\Users\Miguel\Downloads
Install it: pip install PyAudio‑0.2.11‑cp39‑cp39‑win_amd64.whl
Hope it helped!
This answer from a StackOverflow question might help, as I had the same problem and it solved the problem for me.
First run your IDE or CMD as Administrator and run the following:
pip install pipwin
pipwin install pyaudio
Try these commands below:
pip install pipwin
pipwin install pyaudio
Looking at the error message it seems you require Visual C++ build tools.
The link to download that is also given within that error message.
In case the link does not work,You can download it here: https://visualstudio.microsoft.com/visual-cpp-build-tools/
You can try this and incase errors still persist, reply to this thread.
Upvote if it helped!
PyAudio just doesn't have the wheels for Python 3.7 or higher. If you want to use PyAudio, it is best to download python version 3.6.9 here.
I wish you the best
-arivvid27
I tried with Python 3.9 and didn´t work, so I installed Python 3.8 too and pyaudio worked fine (I've double checked and downloaded both versions of pyaudio on https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyaudio).
I still don't know why it doesn't work on 3.9.
Did it work for someone on python 3.9? If yes, let me know what did you do. Thanks!
you should use python 3.6.9 or lower
I'm new to Python, having coded exclusively in R before this.
I'm trying to install a few modules and keep running into the same problem.
pip install fiona
Collecting fiona
Using cached Fiona-1.8.17.tar.gz (1.3 MB)
Note: you may need to restart the kernel to use updated packages.
ERROR: Command errored out with exit status 1:
command: 'C:\forpython\envs\virtual\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Jonah Foong\\AppData\\Local\\Temp\\pip-install-hshotvxk\\fiona\\setup.py'"'"'; __file__='"'"'C:\\Users\\Jonah Foong\\AppData\\Local\\Temp\\pip-install-hshotvxk\\fiona\\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 'C:\Users\Jonah Foong\AppData\Local\Temp\pip-pip-egg-info-hjs8r8t5'
cwd: C:\Users\Jonah Foong\AppData\Local\Temp\pip-install-hshotvxk\fiona\
Complete output (1 lines):
A GDAL API version must be specified. Provide a path to gdal-config using a GDAL_CONFIG environment variable or use a GDAL_VERSION environment variable.
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
I've trawled the forums and looked for past solutions, each to no avail. I have updated setuptools, but the error still appears. I am also running this in a virtual environment.
What seems to be the problem here? It's very frustrating to face issues installing modules on my first day using Python. Any help is appreciated. Thanks.
PS: I'm running Python 3.8.5 on Spyder, if that helps.
Is there any idea about how to install psutil via pip?
$ pip install --user psutil
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 pip 21.0 will remove support for this functionality.
Collecting psutil
Using cached psutil-5.7.2.tar.gz (460 kB)
ERROR: Command errored out with exit status 1:
command: /usr/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-i8HC1h/psutil/setup.py'"'"'; __file__='"'"'/tmp/pip-install-i8HC1h/psutil/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-yZhohS
cwd: /tmp/pip-install-i8HC1h/psutil/
Complete output (3 lines):
/usr/lib64/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'python_requires'
warnings.warn(msg)
error in psutil setup command: 'extras_require' must be a dictionary whose values are strings or lists of strings containing valid project/version requirement specifiers.
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
You can use pip install --upgrade setuptools
then you can try pip install psutil
I would like to use python-saml for sso integration with flask web app. while I am trying to install python-saml package using pip install python-saml, I am getting the below error message.
(myvenv) C:\Users\sekar>pip install python3-saml==1.9.0
Collecting python3-saml==1.9.0
Using cached python3_saml-1.9.0-py3-none-any.whl (72 kB)
Collecting xmlsec>=0.6.0
Using cached xmlsec-1.3.3.tar.gz (29 kB)
Building wheels for collected packages: xmlsec
Building wheel for xmlsec (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\sekar\AppData\Local\conda\conda\envs\myvenv\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\sekar\\AppData\\Local\\Temp\\16\\pip-install-9x0le85b\\xmlsec\\setup.py'"'"'; __file__='"'"'C:\\Users\\sekar\\AppData\\Local\\Temp\\16\\pip-install-9x0le85b\\xmlsec\\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 'C:\Users\sekar\AppData\Local\Temp\16\pip-wheel-39e4ydgb'
cwd: C:\Users\sekar\AppData\Local\Temp\16\pip-install-9x0le85b\xmlsec\
Complete output (5 lines):
running bdist_wheel
running build
running build_ext
error: HTTP Error 404: The specified blob does not exist.
Retrieving "https://ci.appveyor.com/api/buildjobs/hij3a6776pdv2007/artifacts/libxml2-2.9.4.win64.zip" to "build/extra\libxml2-2.9.4.win64.zip"
----------------------------------------
ERROR: Failed building wheel for xmlsec
Running setup.py clean for xmlsec
Failed to build xmlsec
Installing collected packages: xmlsec, python3-saml
Running setup.py install for xmlsec ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\sekar\AppData\Local\conda\conda\envs\myvenv\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\sekar\\AppData\\Local\\Temp\\16\\pip-install-9x0le85b\\xmlsec\\setup.py'"'"'; __file__='"'"'C:\\Users\\sekar\\AppData\\Local\\Temp\\16\\pip-install-9x0le85b\\xmlsec\\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\sekar\AppData\Local\Temp\16\pip-record-l_q25m6k\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\sekar\AppData\Local\conda\conda\envs\myvenv\Include\xmlsec'
cwd: C:\Users\sekar\AppData\Local\Temp\16\pip-install-9x0le85b\xmlsec\
Complete output (5 lines):
running install
running build
running build_ext
error: HTTP Error 404: The specified blob does not exist.
Retrieving "https://ci.appveyor.com/api/buildjobs/hij3a6776pdv2007/artifacts/libxml2-2.9.4.win64.zip" to "build/extra\libxml2-2.9.4.win64.zip"
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\sekar\AppData\Local\conda\conda\envs\myvenv\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\sekar\\AppData\\Local\\Temp\\16\\pip-install-9x0le85b\\xmlsec\\setup.py'"'"'; __file__='"'"'C:\\Users\\sekar\\AppData\\Local\\Temp\\16\\pip-install-9x0le85b\\xmlsec\\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\sekar\AppData\Local\Temp\16\pip-record-l_q25m6k\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\sekar\AppData\Local\conda\conda\envs\myvenv\Include\xmlsec' Check the logs for full command output.
I tried with conda install python-saml, same error also they stopped this package 2 years before. even I tried python3-saml
the core issue is in xmlsec package..
is there any conda channels or PYPI provide this package?
Update
Since version 1.3.7, prebuilt wheels of xmlsec for Windows are published on PyPI, so you shouldn't experience this issue anymore.
Original answer
I have rebuilt xmlsec windows wheels and uploaded them to the releases page of my fork. To install, first install xmlsec passing the additional PyPI index:
$ pip install xmlsec --extra-index-url=https://hoefling.io/pypi
The added index just proxies install request to Github releases.
Now install python3-saml:
$ pip install python3-saml
(Alternative) Selecting the dist manually
You can manually find the wheel matching your Python installation from the releases page and install it using a direct link, e.g.
$ python -c "from pip._internal.pep425tags import get_supported; print(*get_supported()[0], sep='-')"
cp37-cp37m-win_amd64
# the matching wheel is thus xmlsec-1.3.6.post1-cp37-cp37m-win_amd64.whl
$ pip install https://github.com/hoefling/xmlsec/releases/download/1.3.6.post1/xmlsec-1.3.6.post1-cp37-cp37m-win_amd64.whl
(Optional) Verify xmlsec works by invoking the tests
I have executed tests against all built wheels (check out this job log on Appveyor), but you can also run the tests locally to verify xmlsec installation is working:
$ git clone https://github.com/mehcode/python-xmlsec.git && cd python-xmlsec
$ pip install pytest
$ pytest tests/
Never used python-saml here... However, while searching this error, I found these GitHub issues: Issue 1 and Issue 2
Both of them talk about a problem with dm.xmlsec.binding.
Best,
Felipe
I am trying to install the w3af framework, I had some inconveniences as any installation that must be configured several things, I am stuck in the part where you install halberd (halberd-0.2.4.tar.gz):
Collecting halberd==0.2.4
Downloading halberd-0.2.4.tar.gz (214 kB)
|████████████████████████████████| 214 kB 1.8 MB/s
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-yl9osjq5/halberd/setup.py'"'"'; file='"'"'/tmp/pip-install-yl9osjq5/halberd/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-install-yl9osjq5/halberd/pip-egg-info
cwd: /tmp/pip-install-yl9osjq5/halberd/
Complete output (6 lines):
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-install-yl9osjq5/halberd/setup.py", line 72
print "Running tests found in '%s'..." % module
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Running tests found in '%s'..." % module)?
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
I already tried to download the file and install it from pypi.org (https://pypi.org/project/halberd/) and I got the same error, how can I fix it?
The halberd library on Pypi has not been updated since 2010 - it is unmaintained, and incompatible with modern python versions. There is a halberd project on Github, but that was also not updated since 2017.
The w3af project itself has many dependencies on unmaintained libraries, was developed for python2 (which is no longer supported), and has not been updated by its maintainer in a couple of years.
If you are interested in using the framework still, you can check out the w4af project on Github, which includes the same functionality, but has been ported to python3, and all dependencies have also been updated to versions that work with python3.