[英]Strange source command when start Julia REPL
I am a bit fresh to Julia (and stack overflow), so it might be a dummy question.我对 Julia (和堆栈溢出)有点新鲜,所以这可能是一个愚蠢的问题。 I am using VS code in ubuntu 18.04.
我在 ubuntu 18.04 中使用 VS 代码。
Every time I start Julia REPL from VS code (Ctrl+shift+P, then "Julia: Start REPL"), the Julia REPL starts with a strange command "source /home/$user_name/bin/activate" and then an error (of course source is not defined in Julia):每次我从 VS 代码启动 Julia REPL(Ctrl+shift+P,然后是“Julia:启动 REPL”)时,Julia REPL 都会以一个奇怪的命令“source /home/$user_name/bin/activate”开始,然后是一个错误(当然源在 Julia 中没有定义):
ERROR: UndefVarError: source not defined
Stacktrace:
[1] top-level scope
@ REPL[1]:1
This problem was shown a couple of weeks ago but it does not affect my code at least for now.这个问题在几周前就出现了,但至少现在它不会影响我的代码。 I have tried to search the problem but haven't found any similar questions.
我试图搜索这个问题,但没有找到任何类似的问题。 Any hints on what's going on?
关于发生了什么的任何提示? Many thanks!
非常感谢!
Edit: I think I might have used Conda somewhere.编辑:我想我可能在某个地方使用过 Conda。 Do "which Julia", I got:
做“哪个朱莉娅”,我得到了:
/home/$user_name/julia-1.7.2/bin//julia
There is no "/home/$user_name/.julia/config/startup.jl" file, all the directories under "/home/$user_name/.julia/" are as follow:没有“/home/$user_name/.julia/config/startup.jl”文件,“/home/$user_name/.julia/”下的所有目录如下:
artifacts compiled dev logs prefs scratchspaces
clones conda environments packages registries
Then I found a "startup.jl" file under "$JULIA_INSTALL_FOLDER\etc\julia\startup.jl", with following content (seems like not helping on my problem).然后我在“$JULIA_INSTALL_FOLDER\etc\julia\startup.jl”下找到了一个“startup.jl”文件,其中包含以下内容(似乎对我的问题没有帮助)。
# This file should contain site-specific commands to be executed on Julia startup;
# Users may store their own personal commands in `~/.julia/config/startup.jl`.
Solved by following @SundarR's suggestion.按照@SundarR 的建议解决。 The problem was caused by the VSCode-Python extension installed.
该问题是由安装的 VSCode-Python 扩展引起的。
Please see the comment above for the details and thanks again!详情请看上面的评论,再次感谢!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.