Error: legacy-install-failure is a python error which is raised during installation of some library using pip install
command. Primary reasons for this error are –
- Incompatible library wheel.
- Required version of Microsoft Visual C++ isn’t installed.
-
python3-dev
library is missing. - Not using pacman package manager in arch linux.
Solution
Using compatible wheel package will resolve this error. Wheel packages are the driving tools for the seamless installation on different operating systems, hardware and software stack.
For gensim, you might get this error –
running build_ext building 'gensim.models.word2vec_inner' 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. ╰─> gensim note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure.
Along with legacy-resolve-failure error this code is also getting error originates from a subprocess, and is likely not a problem with pip error.
To resolve legacy-resolve-failure error you can download the gensim wheel from here. The naming conventions are – gensim‑4.2.0‑cp39‑cp39‑win_amd64.whl, where cp39 means python 3.9, win means windows and amd64 means 64 bit operating system.
Similarly, you can download the wheels for other libraries. We are providing the list of all the known libraries to us. Choose the one which you are trying to install and getting error. This list is for windows operating system –
- numpy
- numexpr
- triangle
- astropy
- jsonobject
- intbitset
- annoy
- ahds
- aggdraw
- hmmlearn
- hddm
- hdbscan
- glumpy
- pyfltk
- numpy-quaternion
- boost-histogram
- openexr
- naturalneighbor
- mahotas
- heatmap
- pycares
- xxhash
- fiona
- fpzip
- fasttext
- fastcluster
- scimath
- chaco
- traits
- enable
- python-lzo
- pyjnius
- pyicu
- pycifrw
- bsdiff4
- pywinhook
- netcdf4
- gdal
- pycuda
- sqlalchemy
- glfw
- glymur
- pystackreg
- pycryptosat
- bintrees
- biopython
- noise
- fastremap
- boost.python
- cupy
- xgboost
- igraph
- iminuit
- orjson
- maturin
- thinc
- preshed
- cymem
- spacy
- guiqwt
- nlopt
- dulwich
- jupyter
- cx_freeze
- dtaidistance
- hyperspy
- pyzmq
- mod_wsgi
- kiwisolver
- pyopencl
- mercurial
- peewee
- atom
- enaml
- pandas
- numcodecs
- param
- babel
- orange
- pymol-open-source
- pygresql
- openpiv
- cx_logging
- coverage
- scikit-image
- lfdfiles
- pymatgen
- ujson
- reportlab
- msgpack
- regex
- apsw
- bcolz
- fabio
- autobahn
- pytables
- lxml
- freetypepy
- pytomlpp
- vispy
- numba
- llvmlite
- wrf_python
- multiprocess
- pygit2
- yt
- psygnal
- fast-histogram
- h5py
- imread
- typed_ast
- lz4
- blis
- jpype
- yappi
- edt
- statsmodels
- cython
- pydantic
- scikit-learn
- scipy
- python-lzf
- pillow
- numpy-stl
- shapely
- discretize
- ruamel.yaml
- simplejson
- basemap
- gvar
- lief
- protobuf
- murmurhash
- leidenalg
- pyhdf
- gensim
- wrapt
- cf-units
- udunits
- bitarray
- cobra
- fonttools
- opencv
- mkl-service
- mkl_random
- mkl_fft
- curses
- pyasn
- rasterio
- btrees
- wordcloud
- fastrlock
- rtmidi-python
- sounddevice
- pyaudio
- indexed_gzip
- setproctitle
- pyturbojpeg
- pycurl
- pycosat
- blosc
- zopflipy
- brotli
- bitshuffle
- zfpy
- zstd
- cramjam
- twisted
- fastparquet
- python-snappy
- cytoolz
- pyopengl
- frozenlist
- yarl
- multidict
- aiohttp
- icsdll
- python-ldap
- cftime
- psycopg
- pyproj
- rtree
- pygame
- videocapture
- vidsrc
- chebyfit
- akima
- transformations
- psf
- pywavelets
- pyrsistent
- pywinpty
- markupsafe
- psutil
- tornado
- bottleneck
- zope.interface
- greenlet
- pywin32
- pyyaml
- cairocffi
- pycairo
- mplcairo
- cffi
- imagecodecs
- matplotlib
- tifffile
- jcc
- partseg
- pymongo
- zodbpickle
- qutip
- pyamg
- pillow-avif-plugin
- pylibczirw
- sfepy
- swiglpk
- pylibjpeg
- qdldl
- debugpy
- thrift
- kwant
- line_profiler
- fmkr
- mistune
- opentsne
- ets
- roifile
- cvxpy
- cvxopt
- persistent
- moderngl
- dipy
- iris
- kivy
- cmarkgfm
- tinybrain
- minepy
- scs
- texture2ddecoder
- zfec
- aicspylibczi
- rapidjson
- lightgbm
- fisher
- pygraphviz
- psdtags
- lightning
- recordclass
- cgohlke
- netpbmfile
- oiffile
- sdtfile
- cmapfile
- fcsfiles
- kerberos
- zeroc-ice
- caterva
- ndindex
- pyzstd
- pymssql
- arctic
- pymor
- cartopy
- scikits.odes
- ta-lib
- jellyfish
- gmpy
- ecos
- pillow-simd
- osqp
- pygeos
- pyfmi
- assimulo
- cantera
- pyrxp
- py-lmdb
- pyslalib
- pymc
- slycot
- pyspharm
- tomopy
- liblinear
- pytoshop
- louvain-igraph
- pyephem
- tinyarray
- lazy_object_proxy
- lsqfit
- gevent
- spglib
- bfloat16
- mpi4py
- sasl
- google-crc32c
- scikits.vectorplot
- scandir
- msvc_runtime
- pylibtiff
- twainmodule
- mayavi
- vtk
- imgui
- cx_oracle
- pyerfa
- jpegio
- srsly
- gitdb
- blosc2
- casa_formats_io
- openimageio
- liblas
- pyswisseph
- pystemmer
- pydde
- pykinsol
- pyhull
- pyemd
- pycvodes
- pycld2
- pybox2d
- py-earth
- polylearn
- planar
- pystruct
- pocketsphinx
- gpy
- scikit-misc
- salientdetect
- stratify
- spectrum
- sima
- seqlearn
- libsvm
- cellprofiler
- medussa
- crcmod
- crc16
- datrie
- pylvgl
- sparsesvd
- simpleparse
- freesasa
- dukpy
- pycluster
- pycorrfit
- pydensecrf
- cvxcanon
- python-levenshtein
- lru_dict
- logbook
- kapteyn
- pendulum
- openbabel
- ode
- obspy
- lp_solve
- pyodbc
- backports.zoneinfo
- blist
- aspell-python
- ad3
- dawg
- fann2
- bsddb3
- winrandom
- ffnet
- fdint
- flann
- fisx
- pyminuit
- pymaxflow
- pyzopfli
- pyx
- pytinyexr
- pymetis
- python-geohash
- llist
- pytiff
- pycudadecon
- marisa-trie
- tiledb
- mxnet
- natgrid
- dnacurve
- uciwebauth
- molmass
- holopy
- elasticdeform
- centrosome
- pyodeint
- pymvpa
- pymcubes
- simpleaudio
- python-javabridge
- grpcio
- pythonmagick
- pyalembic
- qdafile
- lucam
- imreg
- pypmc
- celiagg
- cheetah
- ceodbc
- pylzma
- netifaces
- slideio
- pyeda
- tatsu
- polygon
- javabridge
- pnumpy
- pythonnet
- menpo
- nitime
- goertzel-fft
- libsbml
- quickfix
- open3d
- xylib-py
- daal4py
- cchardet
- zipline
- pulp
- simpleitk
- pytorch
- zs
- milk
- mlpy
- postgresadapter
- scikit-cycling
- pyqpbo
- pgmagick
- hdf5plugin
- pyfm
- pyflux
- entropy
- cyrasterize
- dubins
- mysqlclient
- ndimage
- debug-information-files
- qimage2ndarray
- imagecodecs-lite
- imaged11
- pyside
- pyvrml97
- pylibczi
- backports.lzma
- x86cpu
- cdecimal
- brotlipy
- fastcache
- czifile
- pyclearvolume
- cellcognition
- vigra
- re2
- meshpy
- scikit-fmm
- pyhook
- fasttsne
- rpy2
- freeimagedll
- chompack
- pysqlite
- tensorflow
- multineat
- pyfits
- grako
- cyordereddict
- qt_graph_helpers
- veusz
- pyqwt
- pyqt4
- trollius
- faulthandler
- thriftpy
- pyldap
- autopy
- jsonlib
- quantlib
- scikit-umfpack
- gr
- pyarrow
- python-cjson
- py_gd
- nipy
- libtfr
- mathutils
- pyfftw
- pyviennacl
- blz
- bigfloat
- cyassimp
- pymca
- friture
- pycogent
- blaze
- scikits.audiolab
- la
- bazaar
- dynd
- genshi
- python-sundials
- pyamf
- libxml-python
- pymcmc
- pyksvd
- pybluez
- mxbase
- libpython
- pymunk
- pygtk
- cgal-bindings
- bio_formats
- pysfml
- pyexiv2
- pylibdeconv
- iocbio
- pymix
- umysql
- lazyflow
- mmlib
- scikits.timeseries
- casuarius
- wxpython
- ilastik
- pywcs
- scientificpython
- vpython
- nmoldyn
- mmtk
- polymode
- scikits.delaunay
- cld
- py-fcm
- oursql
- py2exe
- pymutt
- carray
- llvmpy
- cgkit
- pymedia
- scipy-cluster
- scikits.scattpy
- scikits.samplerate
- scikits.ann
- pyxml
- pytst
- delny
- mysql-python
- htseq
- pyusb-ftdi
- silvercity
- steps
- pysparse
- pyropes
- scikits.hydroclimpy
- sendkeys
- pydbg
- pyisapie
Conclusion
Python wheels are the packages which can simplify the installation of libraries. In case of incompatibility among hardware and software stacks, these wheels helps a lot.
In case of MacOS, always accept the update confirmation in your xcode. This error sometimes appears due to that.