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
Related
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.
I'm using win10 and trying to install geopandas:
C:\Users\61432>pip install geopandas
Collecting geopandas
Using cached geopandas-0.7.0-py2.py3-none-any.whl (928 kB)
Requirement already satisfied: shapely in c:\users\61432\anaconda3\lib\site-packages (from geopandas) (1.7.0)
Collecting fiona
Using cached Fiona-1.8.13.post1.tar.gz (1.2 MB)
ERROR: Command errored out with exit status 1:
command: 'C:\Users\61432\anaconda3\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\61432\\AppData\\Local\\Temp\\pip-install-xgic7o3y\\fiona\\setup.py'"'"'; __file__='"'"'C:\\Users\\61432\\AppData\\Local\\Temp\\pip-install-xgic7o3y\\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\61432\AppData\Local\Temp\pip-install-xgic7o3y\fiona\pip-egg-info'
cwd: C:\Users\61432\AppData\Local\Temp\pip-install-xgic7o3y\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.
First Download packages from https://www.lfd.uci.edu/~gohlke/pythonlibs/
(GDAL,FIONA) put in the file_path where you're working the project
Second Install the packages
cd the file_path> pip install GDAL
i.e (data) C:\Users\mourinho\project> pip install GDAL-3.2.1-cp39-cp39-win_amd64.whl
then
pip install Fiona
i.e (data) C:\Users\mourinho\project> pip install Fiona-1.8.18-cp39-cp39-win_amd64.whl
pip install geopandas
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'm trying to install the bpy package and I’m getting this error:
sara#studentacbook94 ~ % pip install bpy
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. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Defaulting to user installation because normal site-packages is not writeable
Collecting bpy
Using cached bpy-1.2.2.tar.gz (20 kB)
ERROR: Command errored out with exit status 1:
command: /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/05/2hk0czls3nlgx3p6jfk6jk5h0000gp/T/pip-install-1Ot9ZU/bpy/setup.py'"'"'; __file__='"'"'/private/var/folders/05/2hk0czls3nlgx3p6jfk6jk5h0000gp/T/pip-install-1Ot9ZU/bpy/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 /private/var/folders/05/2hk0czls3nlgx3p6jfk6jk5h0000gp/T/pip-install-1Ot9ZU/bpy/pip-egg-info
cwd: /private/var/folders/05/2hk0czls3nlgx3p6jfk6jk5h0000gp/T/pip-install-1Ot9ZU/bpy/
Complete output (6 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/05/2hk0czls3nlgx3p6jfk6jk5h0000gp/T/pip-install-1Ot9ZU/bpy/setup.py", line 179
def build_cmake(self, extension: Extension):
^
SyntaxError: invalid syntax
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
How can I deal with it?
This error appeared because you're using Python 2.7, and desired package has Type Hints, which were added only in 3.5 (documentaion).
Upgrade your version of Python
The NLTK docs say it supports Python 3.7. However, when I try to install it with:
virtualenv -p python3.7 .env
. .env/bin/activate
pip install nltk
I get the error:
Collecting nltk
Using cached https://files.pythonhosted.org/packages/f6/1d/d925cfb4f324ede997f6d47bea4d9babba51b49e87a767c170b77005889d/nltk-3.4.5.zip
ERROR: Command errored out with exit status 1:
command: /path/to/my/project/.env/bin/python3.7 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-12ut35ws/nltk/setup.py'"'"'; __file__='"'"'/tmp/pip-install-12ut35ws/nltk/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 pip-egg-info
cwd: /tmp/pip-install-12ut35ws/nltk/
Complete output (1 lines):
error in nltk setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers; Expected version spec in singledispatch; python_version < "3.4" at ; python_version < "3.4"
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
The error message sounds like NLTK only supports Python < 3.4, but that doesn't make any sense. What am I doing wrong?
It is because the package format was not supported by the distutils, which indicates the package tools may be too old.
Upgrade pip in the virtual environment.
pip install -U pip
pip install -U setuptools
Retry to install nltk.
. .env/bin/activate
pip install nltk
If this still doesn't work. Provide log from pip install nltk -v.
First of all you have to upgrade your pip by using this command
python -m pip install –upgrade pip
First of all you have to navigate to the location of the pip folder
C:\Users\Admin>cd C:\Python\Scripts
Then run this command
pip3 install nltk
hope it will work!