问题
I'm trying to install geopandas on my laptop, a Windows 10 version 1709 machine.
After executing the pip install geopandas command, I'm getting the message:
command python setup.py egg_info failed with error code 1.
I already tried to upgrade pip and setuptools, but still no success. I installed Python 3.6.
回答1:
Assuming you got something like this error:
File "C:\Users\Simon\Anaconda3\lib\site-packages\setuptools\msvc.py", line 848, in __init__
raise distutils.errors.DistutilsPlatformError(err)
distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\Simon\AppData\Local\Temp\pip-build-2vl7e6lb\pyproj\
That error appears because you need to compile the package yourself. On Windows that requires build tools.
You just need to go to the link given to you in your error message and download Build Tools for Visual Studio 2017. Once you have done this, Try the installation command again. It should now work.
You can also find out more information from Windows Compilers
回答2:
Experiencing the same problem, the only thing that worked for me after having tried the various solutions suggested here -- I'm using Jupyter Notebook on Anaconda -- was installing it through the anaconda platform [Environments]; I hope this helps someone.
来源:https://stackoverflow.com/questions/49772348/issue-with-installing-geopandas