Getting error code 1 while installing geopandas with pip

2024/11/17 9:47:42

This is the error I get when trying to install geopandas using pip install geopandas. I'm using Python 3.7.

Collecting geopandasUsing cached https://files.pythonhosted.org/packages/24/11/d77c157c16909bd77557d00798b05a5b6615ed60acb5900fbe6a65d35e93/geopandas-0.4.0-py2.py3-none-any.whl
Collecting pyproj (from geopandas)Using cached https://files.pythonhosted.org/packages/29/72/5c1888c4948a0c7b736d10e0f0f69966e7c0874a660222ed0a2c2c6daa9f/pyproj-1.9.5.1.tar.gzComplete output from command python setup.py egg_info:using bundled proj4..Traceback (most recent call last):File "c:\users\public\anaconda3\lib\site-packages\setuptools\msvc.py", line 489, in _find_latest_available_vc_verreturn self.find_available_vc_vers()[-1]IndexError: list index out of rangeDuring handling of the above exception, another exception occurred:Traceback (most recent call last):File "<string>", line 1, in <module>File "C:\Users\AVIMAT~1\AppData\Local\Temp\pip-install-hnb_xdmp\pyproj\setup.py", line 72, in <module>objects = cc.compile(['nad2bin.c', 'src/pj_malloc.c'])File "c:\users\public\anaconda3\lib\distutils\_msvccompiler.py", line 345, in compileself.initialize()File "c:\users\public\anaconda3\lib\distutils\_msvccompiler.py", line 238, in initializevc_env = _get_vc_env(plat_spec)File "c:\users\public\anaconda3\lib\site-packages\setuptools\msvc.py", line 185, in msvc14_get_vc_envreturn EnvironmentInfo(plat_spec, vc_min_ver=14.0).return_env()File "c:\users\public\anaconda3\lib\site-packages\setuptools\msvc.py", line 843, in __init__self.si = SystemInfo(self.ri, vc_ver)File "c:\users\public\anaconda3\lib\site-packages\setuptools\msvc.py", line 485, in __init__self.vc_ver = vc_ver or self._find_latest_available_vc_ver()File "c:\users\public\anaconda3\lib\site-packages\setuptools\msvc.py", line 492, in _find_latest_available_vc_verraise distutils.errors.DistutilsPlatformError(err)distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\AVIMAT~1\AppData\Local\Temp\pip-install-hnb_xdmp\pyproj\

I have already tried a bunch of other methods, like upgrading setuptools or downloading the Fiona and GDAL binary files, but none of them seem to work.

Answer

As the Traceback says: Download this

https://visualstudio.microsoft.com/downloads/

This will give you the C++ libs required by the lib that you're installing

https://en.xdnf.cn/q/118818.html

Related Q&A

Find if a sorted array of floats contains numbers in a certain range efficiently

I have a sorted numpy array of floats, and I want to know whether this array contains number in a given range. Note that Im not interested in the positions of the number in the array. I only want to k…

Django Operation error: (2026, SSL connection error: SSL_CTX_set_tmp_dh failed)

I can not start my django server after running a statement through manage.py for generating class diagrams from db. And I always get this error but I dont know how to deal with it. OperationalError: (2…

TypeError with module object is not callable

I have a test folder the structure within the folder__init.py__ aa.py test.pyfor aa.pyclass aa:def __init__(self,max):self.max=maxprint max+1def hello(self):print(max)for test.pyimport aa abc = aa(100)…

How to access the GUI output?

Im developing one test bench which runs multiple tests via python gui and prints the output as below.A Passed B Passed C Passed D Passed E PassedButton from gui should be changed to Passed only when A,…

Is it possible to have an api call another api, having them both in same application?

I have a python application running on my localhost:3978. Is it possible to make an api call to http://localhost:3978/api/users from http://localhost:3978/api/accounts? @routes.get("/api/accounts…

Find word near other word, within N# of words

I need an enumerating regex function that identifies instances in a string when Word 1 is within N# words of Word 2 For example, here is my dataframe and objective: Pandas Dataframe Input data = [[ABC…

Create new files, dont overwrite existing files, in python

Im writing to a file in three functions and im trying not overwrite the file. I want every time i run the code i generate a new filewith open("atx.csv", w)as output:writer = csv.writer(output…

Python List comprehension execution order [duplicate]

This question already has answers here:Understanding nested list comprehension [duplicate](2 answers)Closed 4 years ago.matrix = [[1, 2, 3], [4, 5, 6], [7, 8, 9]] squared = [[x**2 for x in row] for row…

Subtract two strings in python

I should calculate the difference between elements two different list. This is my code :import operator a = [5, 35.1, FFD] b = [8.5, 11.3, AMM] difference = [each[0] - each[1] for each in zi…

Python assignment for a phonebook

This weeks lab is based on the example on pages 53,54 of the wikibook "Non-Programmers Tutorial For Python" by Josh Cogliati (2005), (see http://en.wikibooks.org/wiki/Non-Programmer%27s_Tutor…