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 :)
Related
version pip 21.2.4
python 3.6
The command:
pip install -r requirements.txt
The content of my requirements.txt:
mongoengine==0.19.1
numpy==1.16.2
pylint
pandas==1.1.5
fawkes
The command is failing with this error
ERROR: Command errored out with exit status 1:
command: /Users/*/Desktop/ml/*/venv/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/kn/0y92g7x55qs7c42tln4gwhtm0000gp/T/pip-install-soh30mel/mongoengine_89e68f8427244f1bb3215b22f77a619c/setup.py'"'"'; __file__='"'"'/private/var/folders/kn/0y92g7x55qs7c42tln4gwhtm0000gp/T/pip-install-soh30mel/mongoengine_89e68f8427244f1bb3215b22f77a619c/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/kn/0y92g7x55qs7c42tln4gwhtm0000gp/T/pip-pip-egg-info-97994d6e
cwd: /private/var/folders/kn/0y92g7x55qs7c42tln4gwhtm0000gp/T/pip-install-soh30mel/mongoengine_89e68f8427244f1bb3215b22f77a619c/
Complete output (1 lines):
error in mongoengine setup command: use_2to3 is invalid.
----------------------------------------
WARNING: Discarding https://*/pypi/packages/mongoengine-0.19.1.tar.gz#md5=68e613009f6466239158821a102ac084 (from https://*/pypi/simple/mongoengine/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement mongoengine==0.19.1 (from versions: 0.15.0, 0.19.1)
ERROR: No matching distribution found for mongoengine==0.19.1
It looks like setuptools>=58 breaks support for use_2to3:
setuptools changelog for v58
So you should update setuptools to setuptools<58 or avoid using packages with use_2to3 in the setup parameters.
I was having the same problem, pip==19.3.1
I install setuptools==58It worked for me. pip install setuptools==58. The error coming from setuptools==69 that previously run on my device. and Finally saved me setuptools version 58 for this error.
This worked for me.
pip install --upgrade pip setuptools==57.5.0
"pip install setuptools==58" worked for me. The setuptools version was 59 when I upgraded ubuntu to 22.04 and its python 3.10. I started a clean virtual environment for an existings django project. It had just two packages:
`pip list
Package Version
pip 22.0.2
setuptools 59.6.0`
Then I downgrade the setuptools to 58 as pip install setuptools==58.0.0. After that the pip install -r requirements.txt has not such error above.
Upgrading MongoEngine to >= 0.20 would also fix the problem as Python2 support (hence use_2to3) was dropped in 0.20
I'm working on Windows 11 and these solutions didn't work. I installed pybluez2 instead. Your python version >= 3.9 on Windows.
pip install pybluez2
I am trying to install the scipy library with python3 -m pip install --user --no-use-pep517 scipy but I am receiving the following error:
ERROR: Failed building wheel for scipy
Running setup.py clean for scipy
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-spokr6ic/scipy/setup.py'"'"'; __file__='"'"'/tmp/pip-install-spokr6ic/scipy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' clean --all
cwd: /tmp/pip-install-spokr6ic/scipy
I am using that code to install because pip3 install scipy is giving me this error:
ERROR: Failed building wheel for scipy
Failed to build scipy
ERROR: Could not build wheels for scipy which use PEP 517 and cannot be installed directly
How can I resolve this issue?
Python == 3.7.3
PS:The complete traceback is 414 lines. I don't know if I should include here.
Try this:
sudo apt update
sudo apt install -y python3-scipy
I need to install scipy version 1.1.0.
After I run the command pip install scipy==1.1.0, I get the following error:
Collecting scipy==1.1.0
Using cached scipy-1.1.0.tar.gz (15.6 MB)
Using legacy 'setup.py install' for scipy, since package 'wheel' is not installed.
Installing collected packages: scipy
Running setup.py install for scipy ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\myuser\appdata\local\programs\python\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\myuser\\AppData\\Local\\Temp\\pip-install-n02rqpmt\\scipy\\setup.py'"'"'; __file__='"'"'C:\\Users\\myuser\\AppData\\Local\\Temp\\pip-install-n02rqpmt\\scipy\\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\myuser\AppData\Local\Temp\pip-record-qa6zm3ga\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\myuser\appdata\local\programs\python\python38\Include\scipy'
cwd: C:\Users\myuser\AppData\Local\Temp\pip-install-n02rqpmt\scipy\
Complete output (147 lines):
Note: if you need reliable uninstall behavior, then install
with pip instead of using `setup.py install`:
- `pip install .` (from a git repo or downloaded source
release)
- `pip install scipy` (last SciPy release on PyPI)
help me please
You must first install the Python version compatible with scipy.
I could not use pip to install scipy version 1.1 [ I think this version is no longer supported on pip] and used conda instead:
conda install -c anaconda scipy==1.1.0
if you are using pip make sure that, of python2 is installed. or else try with the python3
pip install scipy==1.1.0 for python
pip3 install scipy==1.1.0 for python3
it will install successfully
pip install scipy==1.1.0
Collecting scipy==1.1.0
Downloading https://files.pythonhosted.org/packages/2a/f3/de9c1bd16311982711209edaa8c6caa962db30ebb6a8cc6f1dcd2d3ef616/scipy-1.1.0-cp27-cp27mu-manylinux1_x86_64.whl (30.8MB)
100% |████████████████████████████████| 30.8MB 36kB/s
Collecting numpy>=1.8.2 (from scipy==1.1.0)
Downloading https://files.pythonhosted.org/packages/3a/5f/47e578b3ae79e2624e205445ab77a1848acdaa2929a00eeef6b16eaaeb20/numpy-1.16.6-cp27-cp27mu-manylinux1_x86_64.whl (17.0MB)
100% |████████████████████████████████| 17.0MB 67kB/s
Installing collected packages: numpy, scipy
Successfully installed numpy-1.16.6 scipy-1.1.0
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
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!