# REPL and (VSC Notebook & linter) are seeing different environments

**URL:** <https://discourse.julialang.org/t/repl-and-vsc-notebook-linter-are-seeing-different-environments/129236>\
**Category:** General Usage\
**Created:** [May 22, 2025, 4:01am UTC](https://discourse.julialang.org/t/repl-and-vsc-notebook-linter-are-seeing-different-environments/129236 "2025-05-22T04:01:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jerry](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jerry/32/34537_2.png) [@Jerry](https://discourse.julialang.org/u/Jerry)\
**Post date:** [May 22, 2025, 4:01am UTC](https://discourse.julialang.org/t/repl-and-vsc-notebook-linter-are-seeing-different-environments/129236/1 "2025-05-22T04:01:46Z")

</div>

I’ve used Julia with VS Code for some years. A few days ago I started getting linting errors from the VSC extension related to missing Julia packages. I don’t know what (I) changed to make this happen.

I’ve learned that there are two environments. During shell or REPL execution of Julia files, running

```julia
println(Pkg.project().path)

```

causes

```code
/Users/me/.julia/environments/v1.10/Project.toml

```

However, running the same command from a Jupyter notebook causes

```code
/Users/me/Documents/Programs/Julia/Code/Project.toml

```

These two installations contain different packages. (I only now realized this was happening.) It seems that the linter is seeing the latter path, based on what it complains about regarding missing packages. But the linter has worked without problems for some years. Also, the Julia VSC extension now crashes every time I start VSC.

I have changed pretty much everything that can be changed so I’ve probably messed things up badly. Here’s what I have (macOS):

Julia Executable Path is `/Applications/Julia-1.10.app/Contents/Resources/julia/bin/julia`

Julia Language Server Executable Path is `/Applications/Julia-1.10.app/Contents/Resources/julia/bin/julia` (the same)

Julia Environment Path is `/Users/me/.julia/environments/v1.10`

There are some other settings which I’m not so sure about. For example, inside `.vscode/launch.json` is `"juliaEnv": "${command:activeJuliaEnvironment}"`. This seems like a likely culprit.

How do I fix this mess? My preferred installation is the default one for the official macOS Julia installation.

---

<div class="post-metadata">

**Author:** ![Jerry](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jerry/32/34537_2.png) [@Jerry](https://discourse.julialang.org/u/Jerry)\
**Post date:** [May 23, 2025, 10:06pm UTC](https://discourse.julialang.org/t/repl-and-vsc-notebook-linter-are-seeing-different-environments/129236/2 "2025-05-23T22:06:53Z")

</div>

OP here.

What I had changed a couple of weeks ago to cause this problem was to set the setting for `Julia > lint: missingrefs` to `all`; before it was `none`.

Now, I reset the Julia VSC extension to its defaults. I then renamed the `Manifest.toml` and `Project.toml` files in the workspace folder to `Not Manifest.toml` and `Not Project.toml`. Both REPL and Notebook sessions now operate as expected and the linter reports no missing packages.

So, before renaming the files, the linter was using the Workspace environment instead of the designated environment. I believe this might be a bug.

The only remaining problem is that the linter is reporting a missing reference which is declared in the `startup.jl` file. So apparently the linter is not seeing this file but everything else is. This file is at `/Users/me/.julia/config/startup.jl` with a symlink at `/Users/jerrybauck/Documents/Programs/Julia/Code/startup link.jl`.

FWIW, the reported missing reference from `startup.jl` `PO` which looks like this:

```julia
Plot_Options = (linewidth=2, color=[:red :blue :green :firebrick :purple :green3 :brown :gold],
    size=(600, 400))
PO = Plot_Options

```
