VSCode extension not seeing my julia 1.7.1 install

I can not get the VS Code Julia extension (version 1.5.8) to find my installation of the most recent Julia version (1.7.1). Specifying the execution path does not help. It seems to work for other Julia versions (Julia 1.5.2 and Julia 1.6.2) when I put in those paths, and when I don’t specify the path, it picks up my Julia 1.6.2 install. All are in the default install location, “AppData\Local\Programs”.

From Windows command line (cmd) and PowerShell, “julia” launches the Julia 1.7.1 REPL, and commands work fine there.

I various reboots, uninstalls, and reinstalls of Julia 1.7.1, the extension, and VS Code. I don’t think that it is a permissions problem since running VS Code as Administrator does the same thing. I am not sure what else to try.

Is the extension incompatible with Julia 1.7.1?

I use a bash script to start vscode, which makes it possible to simply refer to julia.

#

# Installation script for portable Julia with VS Code
# version 1.0 (C) 2022, Petr Krysl
set -o errexit 
set -o nounset


# Make sure we are in the folder in which the portable Julia is installed.
MyPortableJulia=julia-1.7.1
if [ ! -d "$(pwd)"/assets/$MyPortableJulia ] ; then
    if [ ! -f "$(pwd)"/assets/$MyPortableJulia-win64.zip ] ; then
        echo "Need to be in the folder with the portable Julia, $MyPortableJulia"
        echo "or the zip file with the portable Julia, assets/$MyPortableJulia-win64.zip"
        exit 1
    fi
    cd assets
    echo "Unzipping assets/$MyPortableJulia-win64.zip"
    unzip -q "$(pwd)"/$MyPortableJulia-win64.zip
    cd ..
fi

# Locate the Julia depot in the current folder.
export MyDepot="$(pwd)"/assets/.$MyPortableJulia-depot
if [ ! -d "$MyDepot" ] ; then
    mkdir "$MyDepot"
fi
export JULIA_DEPOT_PATH="$MyDepot"

# Expand the other zip files
cd assets
if [ ! -d gnuplot ] ; then
    echo Expanding gnuplot assets
    unzip -q gnuplot.zip
fi
cd ..

# Make sure we can start Julia just by referring to the program name.
export PATH="$(pwd)"/assets/$MyPortableJulia/bin:$PATH

# Make sure we can start gnuplot just by referring to the program name.
export PATH="$(pwd)"/assets/gnuplot/bin:$PATH

# Add the Git binary
export PATH="$(pwd)"/assets/PortableGit/bin:$PATH

# Download, and instantiate the tutorial packages, in order to bring Julia depot up-to-date 
echo "Activating/instantiating a package"
for n in Example.jl 
do 
    if [ ! -d $n ] ; then
        echo "Activating and instantiating $n"
        git clone https://github.com/PetrKryslUCSD/$n.git
    fi
    cd $n
    julia -e 'using Pkg; Pkg.activate("."); Pkg.instantiate(); Pkg.precompile(); exit()'
    cd ..
done

# Make sure the Julia REPL when started activates/instantiates
if [ ! -f "$MyDepot"/config/startup.jl ] ; then
        if [ ! -d "$MyDepot"/config ] ; then
                mkdir "$MyDepot"/config
        fi
        touch "$MyDepot"/config/startup.jl
cat<<EOF >> "$MyDepot/config/startup.jl"
using Pkg 
# Disable updating registry on add (still runs on up), as it is slow
Pkg.UPDATED_REGISTRY_THIS_SESSION[] = true
if isfile("Project.toml") && isfile("Manifest.toml")
   Pkg.activate(".") 
   Pkg.instantiate()
end
# Setup Revise.jl
atreplinit() do repl
    try
        @eval using Revise
    catch err
        println("Error starting Revise \$err")
    end
end
# Better format for floats
using Printf 
Base.show(io::IO, f::Float64) = @printf(io, "%1.5e", f)
Base.show(io::IO, f::Float32) = @printf(io, "%1.5e", f)
Base.show(io::IO, f::Float16) = @printf(io, "%1.5e", f)
EOF
fi

# Configure Julia to activate/instantiate opened project
if [ ! -d "$MyDepot"/config ] ; then
    mkdir "$MyDepot"/config
    touch "$MyDepot"/config/startup.jl
fi

# Start VS Code
echo "Starting editor"
assets/VSCode/Code -a Example.jl

See: Portable Julia thread.

I have the same problems. I assume VSCode is not yet compatible with Julia 1.7.1?

My experience is different: Windows 10, Julia 1.7.1 and VS code (Julia extension version 1.5.8) - and it works well. Perhaps something to notice: I have Julia 1.7.1 in my system path (but it appears @quailman1031 has that too).

It sometimes happens for Julia 1.7.0 as well. My workaround is simply to restart VS code until it finds Julia kernel again. :joy:

For completeness, I should have mentioned that I am running under Windows 7.

Try http://hogwarts.ucsd.edu/~pkrysl/shared/Portable_Julia-1.7.zip
I think you may like it.

I have the same problem with my Windows 7

Is this issue resolved? I also met this problem when I upgraded Julia from 1.5 to 1.7.2. Even if my path is correct, Julia extension (v1.5.11) could not start the language server. My system is also windows 7. I can also run Julia in PowerShell without a problem by just typing julia.

I am still having the same issue. I just installed the latest VSCode today. Behave is unchanged.

I also have this issue on a couple of computers running windows 7. It also appears to not work with Julia 1.8.0-beta1. I’ve opened an issue on the julia-vscode github page. https://github.com/julia-vscode/julia-vscode/issues/2772