Installing Julia/Atom/Juno on Corporate Machine

question
juno

#1

Hello all,

I’ve been trying off and on for the past year or so now to install Julia/Atom/Juno on my corporate machine.

I have never successfully been able to get this setup to work, but today I thought I’d give it another go.

I’ve been researching solutions and reading through forums all day, but still seem to be stuck.

First of all, I used the following website for installation instructions on a Windows 7 machine:

Julia itself appeared to install fine, with no errors.
Atom installed fine, with no errors.
Finally, installing uber-juno within Atom appeared to install fine.

When I started Julia within Atom, it began cloning Metadata to H:.julia\v0.5\METADATA
After about a half hour this process finished.

I attempted to execute a simple command within Atom, and the following message was displayed in the terminal window:

PowerShell version < 3 encountered. Running without wrapper (interrupts won't work).
INFO: Initializing package repository H:\.julia\v0.5
ERROR: LoadError: SystemError (with H:\.julia): mkdir: No such file or directory
 in #systemerror#51 at .\error.jl:34 [inlined]
 in (::Base.#kw##systemerror)(::Array{Any,1}, ::Base.#systemerror, ::Symbol, ::Bool) at .\<missing>:0
 in mkdir(::String, ::UInt16) at .\file.jl:74
 in mkpath(::String, ::UInt16) at .\file.jl:83
 in mkpath(::String, ::UInt16) at .\file.jl:81
 in init(::String, ::String) at .\pkg\dir.jl:45
 in #cd#1(::Array{Any,1}, ::Function, ::Function, ::String, ::Vararg{Any,N}) at .\pkg\dir.jl:28
 in add(::String) at .\pkg\pkg.jl:100
 in include_from_node1(::String) at .\loading.jl:488
 in process_options(::Base.JLOptions) at .\client.jl:262
 in _start() at .\client.jl:318
while loading C:\Users\caudaus1\.atom\packages\julia-client\script\boot.jl, in expression starting on line 11
Julia has stopped: 1

Furthermore, a red notification box appeared showing the following:

Error installing Atom.jl package
Go to the Packages → Julia → Open Terminal menu and
run `Pkg.add("Atom")` in Julia, then try again.
If you still see an issue, please report it to:
    julia-users@googlegroups.com

Following the directions in the red notification box simply gives me the same original error as in the terminal.

Does anyone know what I am doing wrong here? Any help is appreciated!


#2

It looks like your home directory is set to H:. If that’s a network drive, that explains why cloning METADATA took so long. You will probably have better results if you set your package directory to a local-drive location via

ENV["JULIA_PKGDIR"] = "C:/Users/caudaus1/.julia"

#3

I tried copy pasting that into a Julia terminal, but all it did was display the quoted text again. Is there a config file I need to be putting this in?


#4

If it fixes your Pkg issues and you want it to always be applied, then you
can add it to your juliarc file.


#5

I added it to the juliarc file, and I believe I’ve made progress. I opened Atom again and tried to Start Julia. It immediately began cloning packages from Github. However, after it was finished the following message was displayed:

================================[ BUILD ERRORS ]================================

WARNING: HttpParser and MbedTLS had build errors.

 - packages with build errors remain installed in C:\Users\caudaus1\.julia\v0.5
 - build the package(s) and all dependencies with `Pkg.build("HttpParser", "MbedTLS")`
 - build a single package by running its `deps/build.jl` script

================================================================================
INFO: Package database updated
INFO: METADATA is out-of-date — you may not have the latest version of Atom
INFO: Use `Pkg.update()` to get the latest versions of your packages
ERROR: LoadError: SystemError (with H:\.julia): mkdir: No such file or directory
 in #systemerror#51 at .\error.jl:34 [inlined]
 in (::Base.#kw##systemerror)(::Array{Any,1}, ::Base.#systemerror, ::Symbol, ::Bool) at .\<missing>:0
 in mkdir(::String, ::UInt16) at .\file.jl:74
 in mkpath(::String, ::UInt16) at .\file.jl:83
 in mkpath(::String, ::UInt16) at .\file.jl:81 (repeats 2 times)
 in compilecache(::String) at .\loading.jl:568
 in require(::Symbol) at .\loading.jl:422
 in include_from_node1(::String) at .\loading.jl:488
 in process_options(::Base.JLOptions) at .\client.jl:262
 in _start() at .\client.jl:318
while loading C:\Users\caudaus1\.atom\packages\julia-client\script\boot.jl, in expression starting on line 29

Are there other places I need to set a new home directory?


#6

I have had a similar issue and managed to find a fix for my corporate pc which also had a network home drive.

In your juliarc.jl file, add the line > ENV[“JULIA_PKGDIR”] = “C:/Users/caudaus1/.atom” not .julia as suggested above.

Next, open a Julia terminal (not in Atom) and type in > Pkg.init() which will then create the missing folder > C:/Users/caudaus1/.atom/v0.5/METADATA

Once, this is complete, open up Atom, type in “1+2” into the console, and it will start linking Atom to Julia.

Hopefully this works for you!


#7

@jadams I tried the change as you suggested. As expected, a new v0.5 folder was created in .atom with METADATA inside. However, when using Atom with Julia there is still an issue.

After typing a simple command in the console window, Julia starts and begin cloning caches and installing packages. This works fine up until:

=============================[ ERROR: HttpParser ]==============================

LoadError: SystemError (with H:\.julia): mkdir: No such file or directory
while loading C:\Users\caudaus1\.atom\v0.5\HttpParser\deps\build.jl, in expression starting on line 1

================================================================================

and

===============================[ ERROR: MbedTLS ]===============================

LoadError: SystemError (with H:\.julia): mkdir: No such file or directory
while loading C:\Users\caudaus1\.atom\v0.5\MbedTLS\deps\build.jl, in expression starting on line 40

================================================================================

It appears as if somewhere I still have a reference to my home directory being on the H drive. Any other ideas?


#8

What is the value of Base.LOAD_CACHE_PATH ?


#9


#10

You should set Base.LOAD_CACHE_PATH[1] to a local path as well then.


#11

Where should I set this path to?
I tried this:


#12

Something like
Base.LOAD_CACHE_PATH[1] = "C:\\Users\\caudaus1\\.atom\\lib\\v0.5"


#13

Ok, I have done this. Should there already be a “lib” folder somewhere? I did not see one in my “.atom” or “v0.5” folder.

When I go back to Atom and try executing a simple command, I am still presented with the following error:

ERROR: LoadError: SystemError (with H:\.julia): mkdir: No such file or directory
 in #systemerror#51 at .\error.jl:34 [inlined]
 in (::Base.#kw##systemerror)(::Array{Any,1}, ::Base.#systemerror, ::Symbol, ::Bool) at .\<missing>:0
 in mkdir(::String, ::UInt16) at .\file.jl:74
 in mkpath(::String, ::UInt16) at .\file.jl:83
 in mkpath(::String, ::UInt16) at .\file.jl:81 (repeats 2 times)
 in compilecache(::String) at .\loading.jl:568
 in require(::Symbol) at .\loading.jl:422
 in include_from_node1(::String) at .\loading.jl:488
 in process_options(::Base.JLOptions) at .\client.jl:262
 in _start() at .\client.jl:318
while loading C:\Users\caudaus1\.atom\packages\julia-client\script\boot.jl, in expression starting on line 29

#14

Have you tried setting the Windows environment variable JULIA_PKGDIR?

Control Panel -> User Accounts --> Change my environment variables


#15

JULIA_PKGDIR Is not in my list of system variables.

Should I add it here? What exactly goes into each field? I don’t want to mess this up with the wrong formatting or wording.


#16

Variable name: JULIA_PKGDIR
Variable value: C:\Users\caudaus1\.julia

Do not also set JULIA_PKGDIR in .juliarc.jl (i.e. remove references)

Also best to remove any existing JULIA_PKGDIR directories from file system, so you are starting clean.


#17

This works on my (university) machine:

Set the environment variable HOME to C:\Users\yourusername (you find/add it at control panel-system-advanced system settings-environment variables-user variables). In case that does not work, try this instead: create a bat file (say, Julia.bat) containing three lines (1) set HOMEDRIVE=C: (2) set HOMEPATH=\Users\yourusername (3) D:\Julia\bin\julia.exe (or wherever it is located). Then run this bat file to use Julia. In either case, you may have to execute Pkg.init() before starting to install packages.

/Paul S


#18

@greg_plowman Previously I believe I was instructed to set Julia inside my “Atom” folder located here:
ENV["JULIA_PKGDIR"] = "C:/Users/caudaus1/.atom"

Should this be the Variable Value? There is no .julia folder inside C:\Users\caudaus1\

EDIT: I went ahead and tried it this way. I also reran Pkg.init() as @Paul_Soderlind suggested. However, Julia was still unable to start in Atom. I was instructed to run Pkg.build(“HttpParser”). So I did this and received the following error:


#19

It doesn’t really matter where it is, but better on local drive. The default is usually .julia in home directory, so I would recommend C:\Users\caudaus1\.julia

Also do not set LOAD_CACHE_PATH in .juliarc.jl


#20

Ok, I am trying it with .julia in my home directory. It is currently cloning Metadata so may take a while.

My .juliarc.jl file is completely empty.

EDIT: Attempted to run Julia from Atom, and was told to run Pkg.update() in the Julia terminal. I did this, and was again presented with the HttpParser error mentioned above.

For reference, this is the location of my Julia binary:
C:\Users\caudaus1\AppData\Local\Julia-0.5.0\bin\julia.exe