alvinxhan / Phydelity

Inference of putative transmission phylogenetic clusters
GNU Lesser General Public License v3.0
11 stars 1 forks source link

Exception: No supported solvers installed. #1

Closed damientully closed 5 years ago

damientully commented 5 years ago

Hi,

I am trying to get Phydelity to work but get the following error message:

> phydelity.py -t example/SHC_MSM_pol_CH_subEpiTree581.nwk
> ------------------------------------------------------------------------
> 
>                                Phydelity                                
>                                   v1.0                                  
> 
> ------------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/Users/damientully/anaconda/envs/py27/bin/phydelity.py", line 4, in <module>
>     __import__('pkg_resources').run_script('Phydelity==1.0', 'phydelity.py')
>   File "/Users/damientully/anaconda/envs/py27/lib/python2.7/site-packages/pkg_resources/__init__.py", line 661, in run_script
>     self.require(requires)[0].run_script(script_name, ns)
>   File "/Users/damientully/anaconda/envs/py27/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1448, in run_script
>     exec(script_code, namespace, namespace)
>   File "/Users/damientully/anaconda/envs/py27/lib/python2.7/site-packages/Phydelity-1.0-py2.7-macosx-10.6-x86_64.egg/EGG-INFO/scripts/phydelity.py", line 77, in <module>
>     
> Exception: 
> No supported solvers installed. See manual for details on how to download and install supported ILP solvers

But Gurobi seems to be installed

gurobi.sh
Python 2.7.10 (default, Feb  7 2017, 00:08:15) 
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

Gurobi Interactive Shell (mac64), Version 7.0.2
Copyright (c) 2017, Gurobi Optimization, Inc.
Type "help()" for help

gurobi> 

Any thoughts? Damien

alvinxhan commented 5 years ago

Hi Damien, thanks for your interest in Phydelity!

It seems that your Python environment is not importing the gurobipy module. It also looks like you are using a separate python 2.7 Anaconda environment (py27).

I'm guessing that the gurobipy module is missing in this separate env -- can you check if the gurobipy.so file in your /Users/damientully/anaconda/envs/py27/lib/python2.7/site-packages/ path? If not, the easiest way to fix this is to install gurobi while you are in the py27 env:

$ source activate py27
(py27) $ conda config --add channels http://conda.anaconda.org/gurobi 
(py27) $ conda install gurobi

Let me know if this works!

damientully commented 5 years ago

Oh thanks I forgot about that. Works now!