# Python virtual env incorrectly sourced on \`Julia: Start REPL\`

**URL:** <https://discourse.julialang.org/t/python-virtual-env-incorrectly-sourced-on-julia-start-repl/114932>\
**Category:** VS Code\
**Created:** [May 29, 2024, 6:35pm UTC](https://discourse.julialang.org/t/python-virtual-env-incorrectly-sourced-on-julia-start-repl/114932 "2024-05-29T18:35:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mpf01](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mpf01/32/8221_2.png) [@mpf01](https://discourse.julialang.org/u/mpf01)\
**Post date:** [May 29, 2024, 6:35pm UTC](https://discourse.julialang.org/t/python-virtual-env-incorrectly-sourced-on-julia-start-repl/114932/1 "2024-05-29T18:35:01Z")

</div>

My current working directory contains a Python virtual env (`.venv`). After the vscode command `Julia: Start REPL` starts the Julia REPL, this command is automatically executed in the REPL

```julia
source /Users/mpf/Documents/projects/Software/KLLS/.venv/bin/activate
julia> source /Users/mpf/Documents/projects/Software/KLLS/.venv/bin/activate
ERROR: ParseError:
# Error @ REPL[1]:1:52
source /Users/mpf/Documents/projects/Software/KLLS/.venv/bin/activate
# ╙ ── invalid identifier
Stacktrace:
 [1] top-level scope
   @ none:1

julia> 

```

Is there a vscode setting that can prevent the editor from sourcing the Python environment? Or at the very least, source the Python environment _before_ starting the Julia REPL.

---

<div class="post-metadata">

**Author:** ![Alex1](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/alex1/32/11771_2.png) [@Alex1](https://discourse.julialang.org/u/Alex1)\
**Post date:** [July 19, 2025, 1:24am UTC](https://discourse.julialang.org/t/python-virtual-env-incorrectly-sourced-on-julia-start-repl/114932/2 "2025-07-19T01:24:49Z")

</div>

Up. I have same error. Although I don’t have any .venv in project folder.

I have `source /Applications/python/bin/activate` in my bash profile.

 ![Screen Shot 2025-07-19 at 11.12.23 am](https://global.discourse-cdn.com/julialang/original/3X/c/7/c75068334c4b0d8c0d96300ddf1a5e8114d15053.jpeg)

UPDATE: I solved it by removing globally activated python venv. But I think its still a bug, it shouldn’t work that way.
