Error: Failed building wheel for quadprog (Ubuntu, python) - quadprog

In macos I did not receive that error, in Windows I had to install Microsoft Visual Studio but on Linux I do not know how to solve this.
The error shows after I type to the terminal:
pip install qpsolvers
I tried many ways and I ask for help.

Try installing g++; this should work:
apt-get install g++
This worked for me:
conda install -c conda-forge gxx

Related

ERROR: Could not build wheels for mpi4py, which is required to install pyproject.toml-based projects

I want to install mpi4py.
The installation fails with the error below.
Please share the solution to the same error.
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for mpi4py
Failed to build mpi4py
ERROR: Could not build wheels for mpi4py, which is required to install pyproject.toml-based projects
[notice] A new release of pip available: 22.3 -> 22.3.1
[notice] To update, run: python -m pip install --upgrade pip
I installed pyproject-toml with "pip install pyproject-toml".
But mpi4py still won't install.
My python version is Python 3.8.0.
The following worked for me:
sudo apt update
sudo apt-get install libopenmpi-dev
It seems that related packages are twisted.
Installed by following the steps below.
apt --fix-broken install
apt install mpich
pip install mpi4py
For me it worked when I used sudo before:
sudo pip install mpi4py
I had the same error message. I used the Anaconda-Navigator interface and it worked fine.
Another option is to use brew. If OpenMPI isn't a dependency issue for you, the installation worked when I used it as well.
brew install mpi4py

ERROR:Failed building wheel for h5pyFailed to build h5pyERROR:Could not build wheels for h5py,which is required toinstall pyproject.toml-basedprojects

I'm getting this error when I'm running the following command to install tensorflow.
python3 -m pip install tensorflow-macos
ERROR: Failed building wheel for h5py
Failed to build h5py
ERROR: Could not build wheels for h5py, which is required to install pyproject.toml-based projects
I tired to install this wheel manually, from the official link (https://pypi.org/project/h5py/#files), it got installed properly but I'm still getting the same error.
I'm facing the above issue in Mac Book M1 chip.
The official doc to use brew install.
$ brew install hdf5
If the above command gives you rosetta 2 issue, then run:-
arch -arm64 brew install hdf5
Once, the h5py installation is done, run following 2 commands:-
$ export HDF5_DIR=/opt/homebrew/Cellar/hdf5/1.12.0_4 OR export HDF5_DIR=/opt/homebrew/opt/hdf5 (if hdf5 is installed in the "/opt/homebrew/opt/hdf5" location, you have to check it out first)
$ pip install --no-binary=h5py h5py
Note:- in the first command "1.12.0_4" is the version of hdfc installed in my system, you have to change it according to yours.
If you are getting the aforementioned error implies you must be using poetry.
Finally run:-
poetry install
We are running the above command, In case poetry wants to update anything.
Once we run poetry install, it might update existing libraries or download new libraries.
So we have to update poetry.lock file as well.
poetry lock
After installing hdf5 try "export HDF5_DIR=/opt/homebrew/opt/hdf5"
Ref: https://github.com/h5py/h5py/issues/2035#issuecomment-1028226141
This works for me:
Install brew (https://brew.sh/)
brew install hdf5
export HDF5_DIR=$(brew --prefix hdf5) (as #sgt pepper said)
pip install --no-binary=h5py h5py

How to install opencv on windows

I want to install face_recognition package on windows using anaconda prompt, however the official documentation says, "Windows not officially supported, but might work".
I'm getting error of OpenCV(dlib) while trying to install face_recognition.
Any help will be appreciated!
I solved my problem by the following commands:
Downgrade python for compatibility.
conda install python=3.6.0
Install dlib from conda-forge
conda install -c conda-forge dlib
Install face_recognition pkg with --no-dependencies flag to avoid installation of dlib as dependency
pip install --no-dependencies face_recognition

Trying to install kivy for python on mac os 10.12

so I am trying to install kivy on my mac.From their instructions page, I am on step 2, and have to enter the command $ USE_OSX_FRAMEWORKS=0 pip install kivy. However, when I put this in terminal, I get the error error: command '/usr/bin/clang' failed with exit status 1, and as a result Failed building wheel for kivy. Does anyone know how to address this issue?
Just had this issue, and was able to fix it following the directions on the kivy mac OS X install page, with one modification as follows:
$ brew install pkg-config sdl2 sdl2_image sdl2_ttf sdl2_mixer gstreamer
$ pip3 install Cython==0.25.2
$ pip3 install kivy
pip3 is my reference to pip for Python 3.6 as I have two different versions of python on my system. May just be pip install for you.
Hope this helps!

set_mode((800,600), FULLSCREEN|DOUBLEBUF, 32) fails on some mac [duplicate]

I have following issue of installing pygame package.
In file included from src/_numericsurfarray.c:23:
src/pygame.h:106:10: fatal error: 'SDL.h' file not found
#include <SDL.h>
^
1 error generated.
error: Setup script exited with error: command 'gcc' failed with exit status 1
System information
Mac OS-10.9.2
python version- Python 2.7.5 :: Anaconda 1.6.1 (x86_64)
Any suggestion will be greatly appreciate ? Thanks.
Here (OSX Mavericks) I got able to install this way:
brew install sdl sdl_image sdl_mixer sdl_ttf portmidi
pip install https://bitbucket.org/pygame/pygame/get/default.tar.gz
("default" branch is on commit e3ae850 right now)
Source: https://bitbucket.org/pygame/pygame/issue/139/sdlh-not-found-even-thought-it-exists#comment-3822470
See this other StackOverflow question too: PyGame in a virtualenv on OS X with brew?
I had the same issue. I tried all versions of the answers to this question including variations of pip and pip3. Finally, the one that worked for me was:
sudo easy_install pygame
Note, however, that: (1) https://setuptools.readthedocs.io/en/latest/easy_install.html says that easy_install is deprecated and recommends using pip. (2) pygame is installed in the old standard python 2.7 folder rather than in the python 3.8.3 that I just installed -- though I was able to use it successfully in VSCode.
My system is also OSX10.9.2,and I also meet you problem,and I'm still try some;
Maybe this will be help for you:
there are some step:
1.Install [Quartz](https://xquartz.macosforge.org/landing/);
2.Install Xcode-Command-Line,
but you may cant install it by `xcode-select --install`,
so you can down from
https://developer.apple.com/downloads/index.action ;
I suggest you setup xcode,and this really solute my some problem;
3.`brew tap homebrew/headonly`
`brew install smpeg --HEAD`
`brew install sdl sdl_image sdl_mixer sdl_ttf portmidi`
4. `sudo pip install hg+http://bitbucket.org/pygame/pygame`;
if you clone this repo and try `python setup.py install`,you may meet some weird problem;
I have try install kivy which is base on pygame and I try lots of times,but just success install pygame one time.Then I uninstall it and also can't install it ;(
some refer:
http://jamesfriend.com.au/installing-pygame-python-mac-os-108-mountain-lion
http://juliaelman.com/blog/2013/04/02/installing-pygame-on-osx-mountain-lion/
=======update
Now I have install pygmae sucess,remeber you should install xcode,not only xcode-command-line!
I managed to install pygame on Mac OSX 10.14.4 using the following:
brew install sdl sdl_image sdl_mixer sdl_ttf portmidi
sudo -H pip3.8 install pygame
This Work for me:
If you haven't installed Python/pip via homebrew (you're using the system-installed Python), you would likely need to run sudo pip3 install pygame.
Before running  pip3 install pygame, I had also installed Command Line Tools for XCode), as well as XQuartz, and the following homebrew packages: brew install sdl sdl_image sdl_mixer sdl_ttf smpeg portmidi.
If homebrew fails to install smpeg you might need to do the following:
brew tap homebrew/headonly
brew install --HEAD smpeg
Source: http://jamesfriend.com.au/installing-pygame-python-mac-os-108-mountain-lion

Resources