Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with instalation #15

Closed
slipperysquid opened this issue Jan 28, 2021 · 15 comments
Closed

Issue with instalation #15

slipperysquid opened this issue Jan 28, 2021 · 15 comments

Comments

@slipperysquid
Copy link

slipperysquid commented Jan 28, 2021

I am trying to install this with pip on Windows 10 and I am getting this error:

ERROR: Command errored out with exit status 1:
   command: 'c:\users\cole\appdata\local\programs\python\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Cole\\AppData\\Local\\Temp\\pip-install-zxg8vk3b\\quadprog_a352456a84104e8aa1df6e8043c0cd04\\setup.py'"'"'; __file__='"'"'C:\\Users\\Cole\\AppData\\Local\\Temp\\pip-install-zxg8vk3b\\quadprog_a352456a84104e8aa1df6e8043c0cd04\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\Cole\AppData\Local\Temp\pip-wheel-usub8qsh'
       cwd: C:\Users\Cole\AppData\Local\Temp\pip-install-zxg8vk3b\quadprog_a352456a84104e8aa1df6e8043c0cd04\
  Complete output (13 lines):
  running bdist_wheel
  running build
  running build_ext
  skipping 'quadprog\quadprog.cpp' Cython extension (up-to-date)
  building 'quadprog' extension
  creating build
  creating build\temp.win-amd64-3.7
  creating build\temp.win-amd64-3.7\Release
  creating build\temp.win-amd64-3.7\Release\quadprog
  C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Iquadprog -Ic:\users\cole\appdata\local\programs\python\python37\include -Ic:\users\cole\appdata\local\programs\python\python37\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\include" /EHsc /Tpquadprog\quadprog.cpp /Fobuild\temp.win-amd64-3.7\Release\quadprog\quadprog.obj
  quadprog.cpp
  c:\users\cole\appdata\local\programs\python\python37\include\pyconfig.h(59): fatal error C1083: Cannot open include file: 'io.h': No such file or directory
  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.28.29333\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
  ----------------------------------------
  ERROR: Failed building wheel for quadprog
  Running setup.py clean for quadprog
Failed to build quadprog
Installing collected packages: quadprog, qtconsole, pyyaml, pillow, opt-einsum, kiwisolver, keras-preprocessing, jupyter-console, ipywidgets, h5py, google-pasta, gast, flatbuffers, django, cycler, coverage, astunparse, tensorflow, sortedcontainers, qpsolvers, pytest-cov, pandas, opencv-python, networkx, matplotlib, keras, jupyter, ipythonblocks, image, cvxopt
    Running setup.py install for quadprog ... error
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\cole\appdata\local\programs\python\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Cole\\AppData\\Local\\Temp\\pip-install-zxg8vk3b\\quadprog_a352456a84104e8aa1df6e8043c0cd04\\setup.py'"'"'; __file__='"'"'C:\\Users\\Cole\\AppData\\Local\\Temp\\pip-install-zxg8vk3b\\quadprog_a352456a84104e8aa1df6e8043c0cd04\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Cole\AppData\Local\Temp\pip-record-qhk5ja67\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\cole\appdata\local\programs\python\python37\Include\quadprog'
         cwd: C:\Users\Cole\AppData\Local\Temp\pip-install-zxg8vk3b\quadprog_a352456a84104e8aa1df6e8043c0cd04\
    Complete output (13 lines):
    running install
    running build
    running build_ext
    skipping 'quadprog\quadprog.cpp' Cython extension (up-to-date)
    building 'quadprog' extension
    creating build
    creating build\temp.win-amd64-3.7
    creating build\temp.win-amd64-3.7\Release
    creating build\temp.win-amd64-3.7\Release\quadprog
    C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Iquadprog -Ic:\users\cole\appdata\local\programs\python\python37\include -Ic:\users\cole\appdata\local\programs\python\python37\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\include" /EHsc /Tpquadprog\quadprog.cpp /Fobuild\temp.win-amd64-3.7\Release\quadprog\quadprog.obj
    quadprog.cpp
    c:\users\cole\appdata\local\programs\python\python37\include\pyconfig.h(59): fatal error C1083: Cannot open include file: 'io.h': No such file or directory
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.28.29333\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\cole\appdata\local\programs\python\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Cole\\AppData\\Local\\Temp\\pip-install-zxg8vk3b\\quadprog_a352456a84104e8aa1df6e8043c0cd04\\setup.py'"'"'; __file__='"'"'C:\\Users\\Cole\\AppData\\Local\\Temp\\pip-install-zxg8vk3b\\quadprog_a352456a84104e8aa1df6e8043c0cd04\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Cole\AppData\Local\Temp\pip-record-qhk5ja67\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\cole\appdata\local\programs\python\python37\Include\quadprog' Check the logs for full command output.

Any Idea how to fix this?

@yikeqicn
Copy link

I have the same issue

@rmcgibbo
Copy link
Collaborator

This SO thread could be relevant. I apologize if you’ve already tried this: https://stackoverflow.com/questions/40018405/cannot-open-include-file-io-h-no-such-file-or-directory

@yikeqicn
Copy link

@rmcgibbo It works after the installation. Thanks so much.

@preeyan
Copy link
Contributor

preeyan commented Sep 28, 2021

Currently we distribute a source distribution only and so users require a C compiler in order to install.

It would improve the user experience to distribute precompiled wheels.

@AntoineD
Copy link

AntoineD commented Oct 6, 2021

I made a PR to address this.

@AntoineD
Copy link

@preeyan Have you seen my PR to create the pre-compiled wheels?

@jessefowers
Copy link

I am unable to pip install quadprog running in a clean Python 3.10 virtual environment on Fedora Linux. It throws an error when attempting to build the wheel.

Currently we distribute a source distribution only and so users require a C compiler in order to install.

I don't think this is just and issue of not having a C compiler. I cloned the repo to my local machine and replicated the commands in the Build package workflow step. I was able to successfully build the quadprog-0.1.11.tar.gz file but when I tried to use pip to install it threw the same error:

pip install dist/quadprog-0.1.11.tar.gz 
Processing ./dist/quadprog-0.1.11.tar.gz
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting numpy
  Using cached numpy-1.22.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.8 MB)
Building wheels for collected packages: quadprog
  Building wheel for quadprog (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for quadprog (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [15 lines of output]
      running bdist_wheel
      running build
      running build_ext
      building 'quadprog' extension
      creating build
      creating build/temp.linux-x86_64-3.10
      creating build/temp.linux-x86_64-3.10/quadprog
      gcc -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/home/zanatoast/repos/ipo/env/include -I/usr/include/python3.10 -c quadprog/linear-algebra.c -o build/temp.linux-x86_64-3.10/quadprog/linear-algebra.o
      gcc -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/home/zanatoast/repos/ipo/env/include -I/usr/include/python3.10 -c quadprog/qr-update.c -o build/temp.linux-x86_64-3.10/quadprog/qr-update.o
      gcc -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/home/zanatoast/repos/ipo/env/include -I/usr/include/python3.10 -c quadprog/quadprog.c -o build/temp.linux-x86_64-3.10/quadprog/quadprog.o
      quadprog/quadprog.c:6:10: fatal error: Python.h: No such file or directory
          6 | #include "Python.h"
            |          ^~~~~~~~~~
      compilation terminated.
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for quadprog
Failed to build quadprog
ERROR: Could not build wheels for quadprog, which is required to install pyproject.toml-based projects

@AntoineD
Copy link

Currently we distribute a source distribution only and so users require a C compiler in order to install.

It would improve the user experience to distribute precompiled wheels.

@preeyan Please kindly let me know if there is anything I can do to help the PR that create precompiled wheels get merged.

@AntoineD
Copy link

AntoineD commented Jun 3, 2022

@leonwehrhan @preeyan Please kindly let me know if there is anything I can do to help the PR that create precompiled wheels get merged.

@petsuter
Copy link

petsuter commented Oct 5, 2022

👍

FYI @AntoineD there are some comments on the PR. Hopefully resolving them helps to get it merged and release wheels. Thanks!

@AntoineD
Copy link

AntoineD commented Oct 5, 2022

@petsuter Those comments are outdated, the commenter and I converged on using an alternative PyPI package that fixes the current issue.

@petsuter
Copy link

petsuter commented Oct 5, 2022

Thanks for the reply. I still run into this issue as a dependency from a different package. Would be great if the quadprog package itself could get wheels to solve this for completely.

@AntoineD
Copy link

AntoineD commented Oct 5, 2022

This was my issue too, you may contact the maintainer of the package that depends on quadprog to see if they are opened to use an alternative packaging of quadprog.
That worked for https://github.com/stephane-caron/qpsolvers.

@petsuter
Copy link

petsuter commented Oct 5, 2022

(Asked in spectrochempy/spectrochempy#482)

@preeyan
Copy link
Contributor

preeyan commented Oct 9, 2022

As of v0.1.11 quadprog now has prebuilt wheels, thanks to the work of @AntoineD .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants