opencobra / cobratoolbox

The COnstraint-Based Reconstruction and Analysis Toolbox. Documentation:
https://opencobra.github.io/cobratoolbox
Other
252 stars 317 forks source link

Matlab installation error #1490

Open teddygroves opened 5 years ago

teddygroves commented 5 years ago

Please include a short description of problem here One of our masters students just across this issue when trying to use the latest cobra on windows with matlab.

>> initCobraToolbox

      _____   _____   _____   _____     _____     |
     /  ___| /  _  \ |  _  \ |  _  \   / ___ \    |   COnstraint-Based Reconstruction and Analysis
     | |     | | | | | |_| | | |_| |  | |___| |   |   The COBRA Toolbox - 2019
     | |     | | | | |  _  { |  _  /  |  ___  |   |
     | |___  | |_| | | |_| | | | \ \  | |   | |   |   Documentation:
     \_____| \_____/ |_____/ |_|  \_\ |_|   |_|   |   http://opencobra.github.io/cobratoolbox
                                                  | 

 > Checking if git is installed ...  Done (version: 2.22.0).
 > Checking if the repository is tracked using git ...  Done.
 > Checking if curl is installed ...  Done.
 > Checking if remote can be reached ...  Done.
 > Initializing and updating submodules (this may take a while)...Entering 'binary'
HEAD is now at d6ba736 Merge pull request #11 from opencobra/GLPKmacOS
error: unknown option `hard'
usage: git submodule--helper foreach [--quiet] [--recursive] [--] <command>

    -q, --quiet           Suppress output of entering each submodule command
    --recursive           Recurse into nested submodules

fatal: run_command returned non-zero status while recursing in the nested submodules of binary
.
Warning: The submodules could not be reset. 
> In initCobraToolbox (line 213) 
 Done.

We managed to get the installer to work by adding some extra quotation marks to this line, i.e.:

 [status_gitReset, result_gitReset] = system('git submodule foreach --recursive "git reset --hard"');

I hereby confirm that I have:

(Note: You may replace [ ] with [X] to check the box)

laurentheirendt commented 5 years ago

@teddygroves, thanks for reporting this. What system are you using? Feel free to submit a PR.

teddygroves commented 5 years ago

I don't know exactly what system Andrei was using but fwiw I don't get the same issue on a mac with matlab 9.5.0.1033004

ThierryMondeel commented 5 years ago

I just want to add that someone in our group encountered the same on a Windows laptop with Git 2.22 and Matlab 2017b. The solution by @teddygroves worked for us too!

raven44099 commented 3 years ago

Please include a short description of problem here One of our masters students just across this issue when trying to use the latest cobra on windows with matlab.

>> initCobraToolbox

      _____   _____   _____   _____     _____     |
     /  ___| /  _  \ |  _  \ |  _  \   / ___ \    |   COnstraint-Based Reconstruction and Analysis
     | |     | | | | | |_| | | |_| |  | |___| |   |   The COBRA Toolbox - 2019
     | |     | | | | |  _  { |  _  /  |  ___  |   |
     | |___  | |_| | | |_| | | | \ \  | |   | |   |   Documentation:
     \_____| \_____/ |_____/ |_|  \_\ |_|   |_|   |   http://opencobra.github.io/cobratoolbox
                                                  | 

 > Checking if git is installed ...  Done (version: 2.22.0).
 > Checking if the repository is tracked using git ...  Done.
 > Checking if curl is installed ...  Done.
 > Checking if remote can be reached ...  Done.
 > Initializing and updating submodules (this may take a while)...Entering 'binary'
HEAD is now at d6ba736 Merge pull request #11 from opencobra/GLPKmacOS
error: unknown option `hard'
usage: git submodule--helper foreach [--quiet] [--recursive] [--] <command>

    -q, --quiet           Suppress output of entering each submodule command
    --recursive           Recurse into nested submodules

fatal: run_command returned non-zero status while recursing in the nested submodules of binary
.
Warning: The submodules could not be reset. 
> In initCobraToolbox (line 213) 
 Done.

We managed to get the installer to work by adding some extra quotation marks to this line, i.e.:

 [status_gitReset, result_gitReset] = system('git submodule foreach --recursive "git reset --hard"');

I hereby confirm that I have:

  • [x] Tried to solve the issue on my own
  • [x] Retried to run my code with the latest version of The COBRA Toolbox
  • [x] Checked that a similar issue has not already been opened

(Note: You may replace [ ] with [X] to check the box)

Worked for me too ! Thanks a lot