Unable to install/use packages with julia-1.0.3

Hello,

I have been using Julia 0.6 for a while and decided to move to 1.0 today.

I’ve read documentation about the new package manager but I’m unable to use any package !

As usual, I installed Julia by unpacking the generic linux x86-64 archive and creating a symbolic link to julia binary in /usr/local/bin.

Then, in julia repl, the following command fails :

using Pkg
ERROR: ArgumentError: Package Pkg not found in current path:
– Run import Pkg; Pkg.add("Pkg") to install the Pkg package.

Moreover, if I enter the pkg repl with ], I don’t see any default environment name before pkg>.
When trying the add command, I always get the following error :

ERROR: no active project

If I activate the current directory as an active project, then It looks like I can install new packages, but when I go back to the julia repl It is not possible to use them.

Do I miss something there ?

Thank you for your help,

Nicolas

Sounds like you’re missing a default environment in your user depot (~/.julia/environments/v1.0). If you touch a Project.toml, Manifest.toml into that folder, you should be good to go…

I already tried that when searching for a similar issue, but this does not make any improvement in my case…

What happens if you delete the environments directory?

In fact, the .julia directory is created when I launch julia for the first time but does not contain any environments folder.

When I activate an environment providing a name, a new folder with the same name is created in the working directory (I launch julia repl from a shell).
And then, I’m not able to use that environment when I leave the pkg repl mode.

This problem occurs on 2 different personal computers where Debian 9 (current stable) is installed.

I just tried julia on Ubuntu 18.04 in a virtual machine (qemu) and everything works as expected !

Moreover the sad thing is I’m not able to compile julia-1.0.3 from sources on my Debian.
The compilation process gets stuck forever at the end, with no cpu usage, when compiling sys.so.

I would be interested to know if anybody with a Debian 9 has already managed to install julia-1.x, and how I should do.

Thanks

I solved my initial problem just by unsetting the variable JULIA_LOAD_PATH that I used with julia 0.6.4

Apparently this also solves my compilation problem !

Without setting the environment variable JULIA_LOAD_PATH, the LOAD_PATH variable in julia repl is

julia> LOAD_PATH
3-element Array{String,1}:
“@”
@v#.#”
@stdlib

Setting JULIA_LOAD_PATH totally erases this array.
Is it done on purpose ? It seems that it should be better to just append the paths contained in JULIA_LOAD_PATH to this array…

Whatever, problem solved :slight_smile:

Just for documentation in case this can help some people like me :

Apparently this is an open issue
https://github.com/JuliaLang/julia/issues/29513

But this is solved by appending : to JULIA_LOAD_PATH.