Issue with installing geopandas - python

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.

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

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.

Related

How to resolve the error of legacy-install-failure?

building 'matplotlib.ft2font' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": <https://visualstudio.microsoft.com/visual-cpp-build-tools/>
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> matplotlib
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure
enter image description here
You need to download Microsoft C++ Build Tools and install it in your system then select Workloads and check the option of Desktop development using C++ .
pip install -r requirements.txt
You need to download Microsoft C++ Build Tools and install it in your system then select Workloads and check the option of Desktop development using C++ . Once this is complete, you can run the installation command again.
OR
You can also choose to download this python library from
Unofficial Windows Binaries for Python Extension Packages
Download the file with name pip install matplotlib‑3.5.1‑cp38‑cp38‑win_amd64.whl
Screenshot
After downloading the file, open cmd in that folder and run the
command:
pip install matplotlib‑3.5.1‑cp38‑cp38‑win_amd64.whl
Similar answer

anaconda can't recognize Microsoft C++ Build Tools

I am a beginer who's just started learning PointCloud online. As I wanted to install one of the python library called torch-points-kernels, I failed. I input pip install torch-points-kernels in AnacondaPrompt, it returns the error information as shown below
building 'torch_points_kernels.points_cuda' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\site-packages\colorama\ansitowin32.py", line 59, in closed
return stream.closed
ValueError: underlying buffer has been detached
----------------------------------------
ERROR: Failed building wheel for torch-points-kernels
Its error information says require Microsoft Visual C++ 14.0 or greater. However, I have downloaded Visual Studio 2019 Community along with some neccessary tools like the latest build tool. It shouldn't return me error messages like above.
After searching relevant issues, many have report they fix this problem by download and run VisualCppBuildTools_Full.exe, which will aotomatically install a build tool . I tried the same and reboot. Although i successfully install the build tool on my computer, however, the problem still remains the same.
Until now, i have two sets of build tools. One is nested in the visual studio, while the other one is a exe file lies in somewhere in my computer. Both of them satisfy the version demanding(greater than 14.0), but both of them can't work for this pip operation.
How can i get this work? Thanks in advance!
Start your visual studio command prompt (start menu followed by typing "x64 Native" will likely bring it up)
Activate anaconda from this terminal by running activate.bat (\Scripts folder)
run your pip command
A somewhat preferable alternative might be to start anaconda prompt and then activate the visual studio tools on top via its .bat. (you can trace that x64 Native shortcut to a vcvars bat file that you need to run with call). This is because some tools of anaconda packages also have a link.exe that might get called instead of the msvc one.

Unable to install new python libraries

I just came back from vacation and after getting a bunch of windows updates, I am no longer able to work with my python env. All the libraries in my virtual env have stopped to work and I kept receiving error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Toolswhen trying to install them again.
I have installed Microsoft Visual C++ build tools again and now it works for some of them(pandas for example). However, for most of libraries(Office365-REST-Python-Client as an example), I am getting this :
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.26.28801\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
----------------------------------------
Running setup.py clean for cryptography
Failed to build cryptography
Failed building wheel for cryptography
Could not build wheels for cryptography which use PEP 517 and cannot be installed directly
BUT I do not have cryptography installed at this point. I have used it in one of my projects before and it seems like those leftovers are breaking something. However, I don't really know where to look for them. I have re-installed python(i have tried few versions as well) to a different location but the problem prevails. Problem occurs from Pycharm and command line.I am really confused so I would appreciate any advice!
Thank you in advance!
What I would suggest is to remove all Python versions and distributions.
Then re-install Python from python.org. You should probably use the "Windows x86-64 executable installer".
Download and install all Python modules you want as wheels (.whl extension). That way you shouldn't have to build anything yourself.

Issues installing Scrapy on windows

I already have anaconda installed version 4.5.4, i went to the cmd to install scrapy referring to the docs pip install Scrapy and got the following error:
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
I tried going to that link but they just give me error 404 page not found.
Go to http://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted to download crossponding whl which may needed when install scrapy.
Then install it: e.g. pip install C:\Twisted-17.5.0-cp36-cp36m-win_amd64.whl, depends on your python version and platform, you may need to download different whl. BTW,cp36 mean cpython3.6.
Finally pip install Scrapy again.
You did not give the full error, and I forgot what others needed. If need others, you can also find it on that web. With this, you can no need to install VC++ and quickly make your environment ready.
You need to install the visual c++ build tools. The link in the error message seems like it's dead, but you can download them here: https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2017
Note that while the error is calling for visual c++ 14.0 - everything will work with newer versions of visual c++.

Error Twisted Module in Python 3.6.3

When tried to install Twisted for Python 3.6.3 it keeps on throwing a particular error :
building 'twisted.test.raiser' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
Tried install the Visual-Cpp-build tools but its a massive 4 + gigs download so is there any other way to do it .. Also I have all the redistributable.
I also had the same problem
what I did is install it manually
got to https://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted
and download suitable twisted version.
then
pip install Twisted-18.9.0-cp36-cp36m-win_amd64.whl
hope this solves for you too
Installing Scrapy on Windows can be a real struggle. Some strange errors can occur.
That's why the scrapy documentation recommands to use Anaconda for the scrapy installation. I think you should give it a try if you are working on Windows.
First you need to install Anaconda following this tutorial.
Then you just need to run this command conda install -c conda-forge scrapy
and you are good to go.

Categories

Resources