2016-12-09 5 views
0

Ich habe eine Umgebung eingerichtet, in der alle Pakete von Conda verwaltet werden (auch für gcc). Was ich tun möchte, ist zu installieren, cvxopt mit GLPK Unterstützung:installation von glpk cvxopt mit conda

CVXOPT_BUILD_GLPK=1 pip install cvxopt 

tun tha direkt an

src/C/glpk.c:24:18: fatal error: glpk.h: No such file or directory 
#include <glpk.h> 
       ^
compilation terminated. 
error: command 'gcc' failed with exit status 1 

führt Also installiere ich glpk mit Conda mit:

conda install -c conda-forge glpk=4.60 

und versuchen wieder:

CVXOPT_BUILD_GLPK=1 pip install cvxopt 

bekommen e rror:

src/C/umfpack.c:23:21: fatal error: umfpack.h: No such file or directory 
#include "umfpack.h" 
        ^
compilation terminated. 
error: command 'gcc' failed with exit status 1 

Also versuche ich es mit zu beheben:

in diesem Fall
conda install -c conda-forge scikit-umfpack=0.2.3 

So CVXOPT_BUILD_GLPK=1 pip install cvxopt erfolgreich ist,

jedoch wenn ich versuche, ein Python-Programm auszuführen:

Traceback (most recent call last): 
    File "my_programme.py", line 19, in <module> 
    from cvxopt import normal, matrix 
    File "/home/me/anaconda2/lib/python2.7/site-packages/cvxopt/__init__.py", line 32, in <module> 
    import cvxopt.base 
ImportError: /home/me/anaconda2/lib/python2.7/site-packages/cvxopt/base.so: undefined symbol: _gfortran_st_write_done 

Ich weiß nicht, wie man das dann löst .... Irgendwelche Hilfe? Vielen Dank. Ich werde es vorziehen, alle Programme zu verwalten Conda mit ....

bearbeiten: danach habe ich versucht:

pip uninstall cvxopt 
conda install -c jjhelmus cvxopt_glpk=1.1.6 

dann habe ich diesen Fehler:

File "my_code.py", line 19, in <module> 
    from cvxopt import normal, matrix 
    File "/home/me/anaconda2/lib/python2.7/site-packages/cvxopt/__init__.py", line 32, in <module> 
    import cvxopt.base 
ImportError: liblapack.so.3gf: cannot open shared object file: No such file or directory 

Ich bin wirklich nicht sicher, warum das so kompliziert sein muss, auch nachdem ich meine pakete mit conda einheitlich verwaltet habe .... Außerdem, nachdem ich all das durcheinander gebracht habe ... wird mein System auch fehlerhaft. Ich bin so aufgeregt über all ....

Nun ... Ich bin am Rande des brechen .... Ich Conda vollständig entfernen und installieren Conda sauber ... und tun dann

conda install -c jjhelmus cvxopt_glpk=1.1.6 

Nach dem Ausführen des Programms, die ich erhalten:

Traceback (most recent call last): 
    File "extract_small_confgs_from_GMC.py", line 19, in <module> 
    from cvxopt import normal, matrix 
    File "/home/me/anaconda2/lib/python2.7/site-packages/cvxopt/__init__.py", line 32, in <module> 
    import cvxopt.base 
ImportError: liblapack.so.3gf: cannot open shared object file: No such file or directory 

Oh mein Gott .....

Antwort

0

ich mit meinem Problem beheben:

conda install -c conda-forge glpk=4.60 
conda install -c conda-forge cvxopt=1.1.8 

Grundsätzlich müssten wir die konsistente Wohnung-Schmiede alles verwenden. z.B. ihre glpk und cvxopt.

Verwandte Themen