InitCobratoolbox error - Curl installed, added to Path variable but not recognized & other errors...

665 views
Skip to first unread message

nb1

unread,
Dec 23, 2017, 9:28:28 AM12/23/17
to COBRA Toolbox
Hi all,

I am trying to use Cobra Matlab Toolbox on windows 10, 64 bit. While using the command, initCobraToolbox,

it says that Curl is not installed even when I have installed it and added the location of curl.exe to the path & also copied the curl-ca-bundle file in that location.

The config report is as follows.

>> generateSystemConfigReport

 > ---------------------------------- SYSTEM CONFIGURATION REPORT ----------------------------------


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

 > Checking if git is installed ...  Done.
 > Checking if the repository is tracked using git ...  Done.
 > Checking if curl is installed ...  (not installed).
 > Checking if remote can be reached ...  (unsuccessful - no internet connection).
 > Adding all the files of The COBRA Toolbox ...  Done.
 > Define CB map output... set to svg.

-----------------------------------------------------------------------------------------------------
MATLAB Version: 9.3.0.713579 (R2017b)
MATLAB License Number: STUDENT
Operating System: Microsoft Windows 10 Home Single Language Version 10.0 (Build 15063)
Java Version: Java 1.8.0_121-b13 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
-----------------------------------------------------------------------------------------------------
MATLAB                                                Version 9.3         (R2017b)
Optimization Toolbox                                  Version 8.0         (R2017b)
Statistics and Machine Learning Toolbox               Version 11.2        (R2017b)
Symbolic Math Toolbox                                 Version 8.0         (R2017b)

 > Default shell       :        
 > Version of shell    :        '--version' is not recognized as an internal or external command,
operable program or batch file.
 > Architecture        :        PCWIN64
 > MATLAB folder       :        C:\Program Files\MATLAB\R2017b
 > COBRA Toolbox root  :        C:\Users\Nikhil\cobratoolbox
 > git version         :        git version 2.15.1.windows.2
 > curl version        :        Could not open
 > CBT_LP_SOLVER       :        
 > CBT_MILP_SOLVER     :        
 > CBT_QP_SOLVER       :        
 > CBT_MIQP_SOLVER     :        
 > CBT_NLP_SOLVER      :        
 > GUROBI_PATH         :        
 > ILOG_CPLEX_PATH     :        
 > TOMLAB_PATH         :        
 > MOSEK_PATH          :        

 > ----------------------------------- END OF CONFIGURATION REPORT -----------------------------------


Why could the curl not be opened in the above?

Also, do the solvers depend on curl to show their notification?

Thanks in advance.

Laurent Heirendt

unread,
Dec 24, 2017, 8:14:10 AM12/24/17
to COBRA Toolbox
Hi,

There are several issues. Did you install git Bash as recommended here : https://opencobra.github.io/cobratoolbox/stable/installation.html#windows ?

It seems as if you installed curl differently than recommended. For instance, there is no need to add curl.exe to the MATLAB path. I recommend that you uninstall git Bash, restart your computer, and then follow the exact installation instructions for git Bash.

Please also make sure that you are connected to the internet.

Best regards,

Laurent

Nikhil Bellarykar

unread,
Dec 25, 2017, 1:24:07 PM12/25/17
to cobra-...@googlegroups.com
Hi Lauren,

I installed Git Bash exactly as said in the link provided by you & also followed the other instructions.

And I added Curl.exe to the user environment variables, not the MATLAB path. 

Still no luck. The initCobraToolbox command says

initCobraToolbox


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

 > Checking if git is installed ...  Done.
 > Checking if the repository is tracked using git ...  Done.
 > Checking if curl is installed ...  (not installed).
 > Checking if remote can be reached ...  (unsuccessful - no internet connection).
 > Adding all the files of The COBRA Toolbox ...  Done.
 > Define CB map output... set to svg.
Error using getDistributedModelFolder (line 36)
Requested Model not present in the model directory.\n This is either due to the model not being downloaded,
or not being part of the distributed models.

Error in initCobraToolbox (line 255)
    xmlTestFile = [getDistributedModelFolder(xmlTestModel) filesep xmlTestModel];




Attaching the Configuration report log. 

Basically the same as before. What seems to be the problem?

Thanks,

Nikhil.










Yours Sincerely,

Nikhil Bellarykar.

--

---
You received this message because you are subscribed to the Google Groups "COBRA Toolbox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cobra-toolbox+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

COBRAconfigReport.log

Laurent Heirendt

unread,
Dec 26, 2017, 5:53:12 AM12/26/17
to COBRA Toolbox
Hi,

There is an issue with the permissions of your git Bash installation. In order to solve this, I recommend the following:

1) Uninstall git Bash (fully remove). Most notably, remove any 'C:\Program Files\Git' entries from the PATH variable.
2) Remove any entry that you explicitly set in the user environment variables (this is important!).
3) Remove this folder if still present: C:\Program Files\curl-7.57.0
4) Restart your computer (do *not* re-install git Bash)
5) Start MATLAB and type: >> restoredefaultpath;
6) Run >> initCobraToolbox. A Portable Git version is automatically downloaded if required, so please make sure that you are connected to the Internet (!).

I also noticed that you still have 2 versions of the COBRA Toolbox (in C:\Program Files\MATLAB\R2017b\toolbox\cobratoolbox and C:\Users\Nikhil\cobratoolbox). I recommend removing the one under C:\Program Files\MATLAB\R2017b.

Please let me know if this worked.

Best regards,

Laurent

Nikhil Bellarykar

unread,
Dec 26, 2017, 3:29:56 PM12/26/17
to cobra-...@googlegroups.com
Hi Laurent,

I followed the steps as you said but still no luck. Attaching the config report herewith.

I am having the same error as before- I removed all deliberate entries from the user environment variable PATH, uninstalled Git, and deleted the Curl folder as well.

Also deleted the Cobra Toolbox under the directory  C:\Program Files\MATLAB\R2017b as could be seen from the configuration report.

I suppose Curl is the root cause of all trouble here. Do I need to install it but not add in the path? 

Sorry to bug you for such a mundane task - but I am at my wit's end here hence bothering you; all help much appreciated.

Yours Sincerely,

Nikhil.
COBRAconfigReport.log

Laurent Heirendt

unread,
Dec 27, 2017, 5:29:59 AM12/27/17
to COBRA Toolbox
Hi Nikhil,

This is definitely an issue with permissions on your machine.

After running initCobraToolbox, may you report what the output is of the following command in MATLAB:

>> system('curl --version')

May you also run this in git Bash and report the output?

$ curl --version

If these commands throw an error, it is also possible that the Portable Git version 2.13.3 is not compatible with MATLAB R2017b. Do you have the possibility of using R2016b?

Thanks,

Laurent

Nikhil Bellarykar

unread,
Dec 28, 2017, 2:18:50 AM12/28/17
to cobra-...@googlegroups.com
Hi Laurent, the output of system('curl --version') is

>> system('curl --version')
Could not open C:\Windows\bin\curl-atom-loader.dll (error 126) 

ans =

    18


The output of $ curl --version on Bash is

curl 7.47.0 (x86_64-pc-linux-gnu) libcurl/7.47.0 GnuTLS/3.4.10 zlib/1.2.8 libidn/1.32 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP UnixSockets


Points to be noted are:

1. I couldn't find the folder C:\Windows\bin

2. I wanted to install curl, so I asked a separate q on stackoverflow which recommended that I install ubuntu on windows so that a bash shell could be used. 


As you said, I didn't reinstall Git Bash after uninstalling it. 

As for R2016b, I think I can use it. In the light of what you said, should I continue with R2017b or simply switch to R2016b?

Let me know. Thanks!

Regards,

Nikhil.

Yours Sincerely,

Nikhil Bellarykar.

Laurent Heirendt

unread,
Dec 29, 2017, 4:50:36 PM12/29/17
to COBRA Toolbox
Hi,

The reason for this error is that you installed Ubuntu for Windows, which we do not support. We only support git Bash on Windows.

I recommend you uninstall the Ubuntu shell for Windows, and follow the official installation guidelines.

Best regards,

Laurent

Nikhil Bellarykar

unread,
Jan 1, 2018, 12:17:44 AM1/1/18
to cobra-...@googlegroups.com
Dear Laurent,

As you said, I installed Matlab 2016b and did the initCobraToolbox. No luck still.

Attaching the Configuration report herewith.

It seems that the Portable Git is installed successfully on Matlab 2016b too but not curl. 

I installed Curl and followed the instructions. If I type curl -V in windows powershell, it works but no response in MATLAB.

What is the problem here? it seems that no matter what I do, Curl and MATLAB don't mix!

Do you think I should wait for the version 3.0 of Cobra toolbox for Windows 10 64 bit?

Thanks,

Nikhil.



Yours Sincerely,

Nikhil Bellarykar.
COBRAconfigReport.log

Nikhil Bellarykar

unread,
Jan 1, 2018, 12:37:53 AM1/1/18
to cobra-...@googlegroups.com
Dear Laurent, 

There was an issue with Curl installation which I fixed - the solution was to copy the curl.exe into the System32 folder.

Now there are no more problems with Git and Curl at least and I can proceed further. Thanks a lot for your patience!

Yours sincerely,

Nikhil.

Yours Sincerely,

Nikhil Bellarykar.
Reply all
Reply to author
Forward
0 new messages