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
Related
When i install scrapy in Python 3.8.2 in MacOS, Display:
Requirement already satisfied: six in /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages (from Automat>=0.3.0->Twisted) (1.15.0)
Requirement already satisfied: idna>=2.5 in /Library/Python/3.8/site-packages (from hyperlink>=17.1.1->Twisted) (2.10)
Building wheels for collected packages: Twisted
Building wheel for Twisted (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /Applications/Xcode.app/Contents/Developer/usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/1w/wtkkznhd5x1f3kgx_x7yjh7r0000gn/T/pip-install-dh7kc0fc/Twisted/setup.py'"'"'; __file__='"'"'/private/var/folders/1w/wtkkznhd5x1f3kgx_x7yjh7r0000gn/T/pip-install-dh7kc0fc/Twisted/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 /private/var/folders/1w/wtkkznhd5x1f3kgx_x7yjh7r0000gn/T/pip-wheel-de42wco6 --python-tag cp38
use command: brew install python3. update python 3.83 to python 3.85. then restart macos. use command: pip3 install scrapy. it is OK.
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 am trying to install geopandas in a virtual enviroment in pycharm . But there is this error message :
Collecting geopandas
Using cached geopandas-0.7.0-py2.py3-none-any.whl (928 kB)
Collecting fiona
Using cached Fiona-1.8.13.post1.tar.gz (1.2 MB)
ERROR: Command errored out with exit status 1:
command: 'G:\Practice Prcatice Practice\pydatatest\venv\Scripts\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\User\\AppData\\Local\\Temp\\pycharm-packaging\\fiona\\setup.py'"'"'; __file__='"'"'C:\\Users\\User\\AppData\\Local\\Temp\\pycharm-packaging\\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\User\AppData\Local\Temp\pycharm-packaging\fiona\pip-egg-info'
cwd: C:\Users\User\AppData\Local\Temp\pycharm-packaging\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 tried all the solutions I could find on internet like doing this :
pip install wheels
pip install pipwin
pipwin install numpy
pipwin install pandas
pipwin install shapely
pipwin install gdal
pipwin install fiona
pipwin install pyproj
pipwin install six
pipwin install rtree
pipwin install geopandas
But nothing seems to work for me . Any help would be appreciated :)
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've installed a separated python version and activated virtual environment based on it , on CentOs7 when i use the pip install method from offline packages i got this error :
ERROR: Command errored out with exit status 127:
command: /home/awagdy/Documents/reporter-web/venv/bin/python3.7 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-jlfbivgb/Django/setup.py'"'"'; __file__='"'"'/tmp/pip-install-jlfbivgb/Django/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-jlfbivgb/Django/
Complete output (1 lines):
/home/awagdy/Documents/reporter-web/venv/bin/python3.7: error while loading shared libraries: libpython3.7m.so.1.0: cannot open shared object file: No such file or directory
----------------------------------------
ERROR: Command errored out with exit status 127: python setup.py egg_info Check the logs for full command output.
I'm installing from a folder that contains the needed packages downloaded using the command pip download , then installing them offline using pip install -r requirements.txt --no--index --find-links=pkgs
The link below, the person suggests using
easy_install when installing python packages in a virtual environment
example
Using this command helped path/to/python/python3.6 -m pip install -r requirements.txt --no-index --find-links=path/to/pkgs