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

Can't install swiglpk/cobrapy in Docker image #1253

Closed
Wealing opened this issue Jul 18, 2022 · 1 comment
Closed

Can't install swiglpk/cobrapy in Docker image #1253

Wealing opened this issue Jul 18, 2022 · 1 comment

Comments

@Wealing
Copy link

Wealing commented Jul 18, 2022

This is my docker file which fails when building.

FROM python:3.10 AS base
RUN pip install pipenv
RUN apt-get update && apt-get install -y --no-install-recommends gcc
RUN PIPENV_VENV_IN_PROJECT=1 
RUN pipenv install cobra

Any help would be appreciated. This happens for python images 3.9 and 3.8 as well. FYI, I've also created a similar issue in swiglpk

I get the following error message:

#8 7.649 Collecting swiglpk
#8 7.649   Downloading swiglpk-5.0.0.tar.gz (32 kB)
#8 7.649   Preparing metadata (setup.py): started
#8 7.649   Preparing metadata (setup.py): finished with status 'error'
#8 7.649 
  error: subprocess-exited-with-error
#8 7.649   
#8 7.649   × python setup.py egg_info did not run successfully.
#8 7.649   │ exit code: 1
#8 7.649   ╰─> [13 lines of output]
#8 7.649       Traceback (most recent call last):
#8 7.649         File "<string>", line 2, in <module>
#8 7.649         File "<pip-setuptools-caller>", line 34, in <module>
#8 7.649         File "/tmp/pip-install-f0og7wp6/swiglpk_0fbc9a0e2e46479c86d9d5d73d4c7b75/setup.py", line 52, in <module>
#8 7.649           glpk_header_dirname = find_glpk_header()
#8 7.649         File "/tmp/pip-install-f0og7wp6/swiglpk_0fbc9a0e2e46479c86d9d5d73d4c7b75/setup.py", line 35, in find_glpk_header
#8 7.649           glpsol_dirname = os.path.dirname(subprocess.check_output(['which', 'glpsol']))
#8 7.649         File "/usr/local/lib/python3.10/subprocess.py", line 420, in check_output
#8 7.649           return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
#8 7.649         File "/usr/local/lib/python3.10/subprocess.py", line 524, in run
#8 7.649           raise CalledProcessError(retcode, process.args,
#8 7.649       subprocess.CalledProcessError: Command '['which', 'glpsol']' returned non-zero exit status 1.
#8 7.649       Trying to determine glpk.h location
#8 7.649       [end of output]
#8 7.649   
#8 7.649   note: This error originates from a subprocess, and is likely not a problem with pip.
#8 7.649 error: metadata-generation-failed
#8 7.649 
#8 7.649 × Encountered error while generating package metadata.
#8 7.649 ╰─> See above for output.
#8 7.649 
#8 7.649 note: This is an issue with the package mentioned above, not pip.
#8 7.649 hint: See above for details.
#8 7.649 
This is likely caused by a bug in cobra. Report this to its maintainers.
#8 7.691✘ Installation Failed 

@cdiener
Copy link
Member

cdiener commented Jul 18, 2022

The swiglpk we're the right place for this. Closing it here.

@cdiener cdiener closed this as completed Jul 18, 2022
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

2 participants