Errors while trying to use JuMP

395 views
Skip to first unread message

Kostas Tavlaridis-Gyparakis

unread,
Jun 12, 2015, 9:25:50 AM6/12/15
to julia...@googlegroups.com

Hello,
I am really new to Julia and not the best programmer mysefl.
I run linux mint 16 and I installed julia via terminal (sudo apt-get install julia ).
Then when I run Julia on my terminal, while the JuMP package is installed
sth that I believe the following two commands on my terminal prove:

julia> Pkg.update()
INFO: Updating METADATA...
INFO: Computing changes...
INFO: No packages to install, update or remove

julia> Pkg.add("JuMP")
INFO: Nothing to be done

Then when I try to use JuMP I get the following error msg:

julia> using JuMP
ERROR: Block not defined
in include at ./boot.jl:245
in include_from_node1 at ./loading.jl:128
in include at ./boot.jl:245
in include_from_node1 at ./loading.jl:128
in reload_path at loading.jl:152
in _require at loading.jl:67
in require at loading.jl:54
in include at ./boot.jl:245
in include_from_node1 at ./loading.jl:128
in reload_path at loading.jl:152
in _require at loading.jl:67
in require at loading.jl:54
in include at ./boot.jl:245
in include_from_node1 at ./loading.jl:128
in reload_path at loading.jl:152
in _require at loading.jl:67
in require at loading.jl:54
in include at ./boot.jl:245
in include_from_node1 at ./loading.jl:128
in include at ./boot.jl:245
in include_from_node1 at ./loading.jl:128
in reload_path at loading.jl:152
in _require at loading.jl:67
in require at loading.jl:54
in include at ./boot.jl:245
in include_from_node1 at ./loading.jl:128
in reload_path at loading.jl:152
in _require at loading.jl:67
in require at loading.jl:51
while loading /home/kostas/.julia/v0.3/Docile/src/types.jl, in expression starting on line 2
while loading /home/kostas/.julia/v0.3/Docile/src/Docile.jl, in expression starting on line 19
while loading /home/kostas/.julia/v0.3/DataStructures/src/DataStructures.jl, in expression starting on line 48
while loading /home/kostas/.julia/v0.3/Graphs/src/Graphs.jl, in expression starting on line 2
while loading /home/kostas/.julia/v0.3/ReverseDiffSparse/src/coloring.jl, in expression starting on line 1
while loading /home/kostas/.julia/v0.3/ReverseDiffSparse/src/ReverseDiffSparse.jl, in expression starting on line 20
while loading /home/kostas/.julia/v0.3/JuMP/src/JuMP.jl, in expression starting on line 13

Finally the msg I receive for Block is the following:

julia> Pkg.checkout("Block")
ERROR: Block is not a git repo
in checkout at pkg/entry.jl:190
in anonymous at pkg/dir.jl:28
in cd at ./file.jl:20
in cd at pkg/dir.jl:28
in checkout at pkg.jl:33

Joey Huchette

unread,
Jun 12, 2015, 11:52:49 AM6/12/15
to julia...@googlegroups.com

What’s the output of Pkg.status()? It seems like an issue with Docile, not JuMP.

Kostas Tavlaridis-Gyparakis

unread,
Jun 13, 2015, 3:09:26 AM6/13/15
to julia...@googlegroups.com
Here is the output I get:

julia> Pkg.status()
4 required packages:
 - CPLEX                         0.0.9
 - Images                        0.4.37
 - Jewel                         1.0.4
 - JuMP                          0.5.8
27 additional packages:
 - AnsiColor                     0.0.2
 - BinDeps                       0.3.9
 - Calculus                      0.1.4
 - Color                         0.4.5
 - Compat                        0.4.4
 - Compose                       0.3.12
 - DataStructures                0.3.9
 - Docile                        0.1.0
 - DualNumbers                   0.1.0
 - FactCheck                     0.1.2
 - FixedPointNumbers             0.0.7
 - Graphics                      0.1.0
 - Graphs                        0.4.3
 - Iterators                     0.1.7
 - JSON                          0.4.0
 - JuliaParser                   0.6.2
 - LNR                           0.0.1
 - Lazy                          0.8.4
 - Markdown                      0.3.0
 - MathProgBase                  0.3.1
 - Requires                      0.1.2
 - ReverseDiffSparse             0.1.2
 - SHA                           0.0.4
 - SIUnits                       0.0.3
 - TexExtensions                 0.0.2
 - URIParser                     0.0.5
 - Zlib                          0.1.8

Kostas Tavlaridis-Gyparakis

unread,
Jun 13, 2015, 4:36:39 AM6/13/15
to julia...@googlegroups.com
Pkg.add("Docile")

INFO: Nothing to be done
INFO: METADATA is out-of-date — you may not have the latest version of Docile
INFO: Use `Pkg.update()` to get the latest versions of your packages

Seth

unread,
Jun 13, 2015, 5:22:07 AM6/13/15
to julia...@googlegroups.com
Might not be related, but your Docile package is way out of date. It's currently at 0.5.6, and you appear to be running 0.1.0.


On Saturday, June 13, 2015 at 3:36:39 AM UTC-5, Kostas Tavlaridis-Gyparakis wrote:
Pkg.add("Docile")
INFO: Nothing to be done
INFO: METADATA is out-of-date — you may not have the latest version of Docile
INFO: Use `Pkg.update()` to get the latest versions of your packages
 - Docile                        0.1.0

Kostas Tavlaridis-Gyparakis

unread,
Jun 13, 2015, 5:44:48 AM6/13/15
to julia...@googlegroups.com
Only problem is that when I run the updtate command in julia I receive a msg that there is nothing to be upgraded:


Pkg.update()
INFO: Updating METADATA...
INFO: Computing changes...
INFO: No packages to install, update or remove



SVAKSHA

unread,
Jun 13, 2015, 5:57:58 AM6/13/15
to julia...@googlegroups.com
On Sat, Jun 13, 2015 at 9:44 AM, Kostas Tavlaridis-Gyparakis
<kostas.t...@gmail.com> wrote:
> Only problem is that when I run the updtate command in julia I receive a msg
> that there is nothing to be upgraded:

Try the update command after you manually delete the "Docile" package
from `~/.julia/.cache` and `v0.4/` folders. <-- Do check the julia
version your system has. Before doing this take a backup of the
`.julia` folder, just in case...

HTH,
SVAKSHA ॥ http://about.me/svaksha

SVAKSHA

unread,
Jun 13, 2015, 5:59:49 AM6/13/15
to julia...@googlegroups.com
On Sat, Jun 13, 2015 at 9:57 AM, SVAKSHA <sva...@gmail.com> wrote:
> On Sat, Jun 13, 2015 at 9:44 AM, Kostas Tavlaridis-Gyparakis
> <kostas.t...@gmail.com> wrote:
>> Only problem is that when I run the updtate command in julia I receive a msg
>> that there is nothing to be upgraded:
>
> Try the update command after you manually delete the "Docile" package

After you delete Docile, try Pkg.add("Docile"), then Pkg.update()

Kostas Tavlaridis-Gyparakis

unread,
Jun 13, 2015, 6:03:17 AM6/13/15
to julia...@googlegroups.com, sva...@gmail.com
Followed your recommendation but have to note the following things:

1) I have Julia v0.3 even if I just downloaded Julia this week
2) after deleting Dolice and running update command again the version 0.1 was installed:


Pkg.update()
INFO: Updating METADATA...
INFO: Computing changes...
INFO: Cloning cache of Docile from git://github.com/MichaelHatherly/Docile.jl.git
INFO: Installing Docile v0.1.0

Kostas Tavlaridis-Gyparakis

unread,
Jun 13, 2015, 6:17:05 AM6/13/15
to julia...@googlegroups.com, sva...@gmail.com
Also, if I try to update Dolice (after having deleting it from the above mentioned directories)
 by first typing Pkg.add("Dolice") I receive following error:

Pkg.add("Docile")
ERROR: unknown package Docile
 in wait at task.jl:51
 in sync_end at ./task.jl:306
 in add at pkg/entry.jl:314
 in add at pkg/entry.jl:71

 in anonymous at pkg/dir.jl:28
 in cd at ./file.jl:20
 in __cd#226__ at ./pkg/dir.jl:28
 in add at pkg.jl:20


I can only install it if I directly run the Pkg.update() command, which does install v. 0.1 as mentioned above

SVAKSHA

unread,
Jun 13, 2015, 7:25:05 AM6/13/15
to Kostas Tavlaridis-Gyparakis, julia...@googlegroups.com
On Sat, Jun 13, 2015 at 10:03 AM, Kostas Tavlaridis-Gyparakis
<kostas.t...@gmail.com> wrote:
> Followed your recommendation but have to note the following things:
>
> 1) I have Julia v0.3 even if I just downloaded Julia this week
> 2) after deleting Dolice and running update command again the version 0.1
> was installed:

Run update after installing Docile. I'm on 0.4 so I dont know what
version of Docile the stable version installs, but try using
`Pkg.pin()` to force a specific version of the package. Unregistered
packages can be installed via the url, so you can try
Pkg.clone("git://example.com/path/to/Package.jl.git")
SVAKSHA ॥ http://about.me/svaksha

Kostas Tavlaridis-Gyparakis

unread,
Jun 13, 2015, 7:45:12 AM6/13/15
to julia...@googlegroups.com, kostas.t...@gmail.com, sva...@gmail.com
When i run update after I install Dolice there is nothing new:


Pkg.update()
INFO: Updating METADATA...
INFO: Computing changes...
INFO: No packages to install, update or remove

How can I update from terminal to julia 0.4 myself?
Also I am not quiet sure how to use clone command
to force julia Dolice to the latest version (sorry I am
a real noob).

Tim Holy

unread,
Jun 13, 2015, 8:50:56 AM6/13/15
to julia...@googlegroups.com
Check to see what Pkg.status() says. You may have another package that is
pinning Docile at 0.1?

--Tim

Kostas Tavlaridis-Gyparakis

unread,
Jun 13, 2015, 9:11:16 AM6/13/15
to julia...@googlegroups.com
Here is the outcome of Pkg.status():

Pkg.status()
5 required packages:
 - CPLEX                         0.0.9
 - Docile                        0.1.0

 - Images                        0.4.37
 - Jewel                         1.0.4
 - JuMP                          0.5.8
26 additional packages:

 - AnsiColor                     0.0.2
 - BinDeps                       0.3.9
 - Calculus                      0.1.4
 - Color                         0.4.5
 - Compat                        0.4.4
 - Compose                       0.3.12
 - DataStructures                0.3.9
 - DualNumbers                   0.1.0
 - FactCheck                     0.1.2
 - FixedPointNumbers             0.0.7
 - Graphics                      0.1.0
 - Graphs                        0.4.3
 - Iterators                     0.1.7
 - JSON                          0.4.0
 - JuliaParser                   0.6.2
 - LNR                           0.0.1
 - Lazy                          0.8.4
 - Markdown                      0.3.0
 - MathProgBase                  0.3.1
 - Requires                      0.1.2
 - ReverseDiffSparse             0.1.2
 - SHA                           0.0.4
 - SIUnits                       0.0.3
 - TexExtensions                 0.0.2
 - URIParser                     0.0.5
 - Zlib                          0.1.8


Miles Lubin

unread,
Jun 14, 2015, 8:34:30 AM6/14/15
to julia...@googlegroups.com
What is the output of versioninfo() (at the Julia command line)?

Also, try deleting your ~/.julia directory and reinstalling the packages you need.

Kostas Tavlaridis-Gyparakis

unread,
Jun 14, 2015, 8:38:47 AM6/14/15
to julia...@googlegroups.com
The output of versioninfo() is the following:

Julia Version 0.3.0-rc1+54
Commit 4e92487 (2014-07-17 05:40 UTC)
Platform Info:
  System: Linux (x86_64-linux-gnu)
  CPU: Intel(R) Core(TM) i5-4300U CPU @ 1.90GHz
  WORD_SIZE: 64
  BLAS: libblas.so.3
  LAPACK: liblapack.so.3
  LIBM: libopenlibm


I already deleted the Docile package from the julia directory and reinstalled it,
but again with no luck and also again the old version of 0.1 was installed.

Miles Lubin

unread,
Jun 14, 2015, 8:57:29 AM6/14/15
to julia...@googlegroups.com

You're using a prerelease version of 0.3 from nearly a year ago. Not sure how this came to be installed, but you'll need to update to 0.3.0 release or later.

Kostas Tavlaridis-Gyparakis

unread,
Jun 14, 2015, 10:03:35 AM6/14/15
to julia...@googlegroups.com
Ok, so after deleting all the julia files from my laptop
and downloading the latest version from github (
git clone git://github.com/JuliaLang/julia.git
), when I try to run make in the terminal after a huge run of 50 minutes
in the end the following msg is desplayed in my terminal:

checking for suitable m4... configure: error: No usable m4 in $PATH or /usr/5bin (see config.log for reasons).
make[1]: *** [gmp-6.0.0/config.status] Error 1
make: *** [julia-deps] Error 2

Kostas Tavlaridis-Gyparakis

unread,
Jun 14, 2015, 10:16:46 AM6/14/15
to julia...@googlegroups.com
Ok fixed that one, but now I have another installation problem,
I receive the following error:
/bin/sh: 2: cmake: not found
make[1]: *** [libgit2/build/Makefile] Error 127

make: *** [julia-deps] Error 2

Once I do finally manage to sucessfully install julia I will come back to you!

Tony Kelman

unread,
Jun 14, 2015, 4:57:13 PM6/14/15
to julia...@googlegroups.com
Check the list of required built tools here https://github.com/JuliaLang/julia#required-build-tools-and-external-libraries if you want to build from source. Note that unless you're contributing to Julia development, you should build from the release-0.3 stable branch.

You shouldn't have to build from source though, have you tried the generic Linux binaries from http://julialang.org/downloads/ ? Download and extract https://julialang.s3.amazonaws.com/bin/linux/x64/0.3/julia-0.3.9-linux-x86_64.tar.gz and it should work right away.

Kostas Tavlaridis-Gyparakis

unread,
Jun 15, 2015, 1:20:03 PM6/15/15
to julia...@googlegroups.com
I downloaded and extracted the version that you put in the link, but for some reason now, when I run
Julia on terminal the pck command doesn't seem to work.
This is the msg I get when I try to use any command related with pkd:

Pkg.status()
ERROR: could not spawn `git version`: no such file or directory (ENOENT)
 in _jl_spawn at process.jl:217
 in spawn at process.jl:348
 in open at ./process.jl:397
 in readbytes at ./process.jl:461
 in version at ./pkg/git.jl:34
 in init at ./pkg/dir.jl:32
 in cd at pkg/dir.jl:25
 in status at pkg.jl:28 (repeats 2 times)

Tony Kelman

unread,
Jun 15, 2015, 1:44:51 PM6/15/15
to julia...@googlegroups.com
Which Linux distribution are you using? That error most likely means you don't have git installed, you need to manually install it through your distribution's package manager (apt-get, yum, pacman, zypper, etc). I'm a little surprised Pkg commands were able to work from the 0.3-prerelease version of Julia that you had been using (where did that come from anyway?). I think there was a git version check added in to the initialization of Pkg since the previous version you had been using.

Kostas Tavlaridis-Gyparakis

unread,
Jun 15, 2015, 1:57:21 PM6/15/15
to julia...@googlegroups.com
The 0.3-prerelease version of Julia was installed in my machine when I tried to isntall julia from the terminal
by typing "sudo apt-get install julia".
I run linux mint 16 on my laptop.
When I try to apt-get install git, I receive the following error:

Traceback (most recent call last):
  File "/usr/lib/command-not-found", line 21, in <module>
    os.execvp("python3", [sys.argv[0]] + sys.argv)
  File "/usr/lib/python2.7/os.py", line 344, in execvp
    _execvpe(file, args)
  File "/usr/lib/python2.7/os.py", line 380, in _execvpe
    func(fullname, *argrest)
OSError: [Errno 2] No such file or directory

Tony Kelman

unread,
Jun 15, 2015, 2:22:34 PM6/15/15
to julia...@googlegroups.com
I see. I'm a little surprised a distribution chose to package a prerelease (but then again there was only one bugfix release between 0.2 and 0.3, so maybe not).

I have no idea why installing git would try to do execvp on python3, but that looks like you need to install python3?

According to http://www.linuxmint.com/oldreleases.php, Linux Mint 16 has been "Obsolete since July 2014" so you may also need to upgrade to a supported version of the distribution for the package manager to work properly. I'm not sure.

Kostas Tavlaridis-Gyparakis

unread,
Jun 15, 2015, 4:02:34 PM6/15/15
to julia...@googlegroups.com
Ok, I'll proceed with the upgrades tomorrow and let you know.
Thanks a lot for all the help so far hope tomorrow I will finally have
JuMP working.

Kostas Tavlaridis-Gyparakis

unread,
Jun 16, 2015, 8:00:46 AM6/16/15
to julia...@googlegroups.com
So finally after upgrading my OS (actually switched to Ubuntu),
JuMP finally works!
Thanks a lot for all the help, probably I will come back with other questions regarding
connecting C++ code with Julia in the future, but for the moment problem solved!
Reply all
Reply to author
Forward
0 new messages