简体   繁体   English

启动 Julia REPL 时奇怪的源命令

[英]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.

相关问题 有没有办法抑制 Julia REPL 中伴随错误的堆栈跟踪? - Is there a way to suppress the stacktrace that accompanies an error in the Julia REPL? 当我在 VS Code 中编程 Julia 时,为什么快捷方式“Ctrl + Enter”不会将我的当前行发送到 REPL? - Why the shortcut "Ctrl + Enter" doesn't send my current line to REPL when I program Julia in VS Code? 无法在 VS Code 中启动 julia 语言服务器 - Could not start the julia language server in VS Code 如何在VS Code中重新启动Julia kernel? - How to re-start the Julia kernel in VS Code? 启动 ROS 核心时,我在 Visual Studio Code 上收到“找不到命令 'vscode.previewHtml'” - I get the “command 'vscode.previewHtml' not found” on Visual Studio Code when I start ROS core 当我尝试运行我的 React 应用程序时,npm 启动命令不起作用 - npm start command not working, when I try to run my React application Python 3.7导入命令上的奇怪Pylint错误 - Strange Pylint Error on Python 3.7 import command 在 vscode 中使用 Jupyter 时如何内联绘制 julia? - How to plot julia inline when using Jupyter in vscode? StackOverflowError:使用 julia 矩阵除法 A/B 时 [部分解决!] - StackOverflowError: When Using julia Matrix Divide A/B [ partially solved !] 使用 `dotnet new webapi` 命令创建项目时,我在 Web Api 项目中没有 **App_Start** 文件夹 - I do not have the **App_Start** folder in a Web Api project when the project is created using the `dotnet new webapi` command
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM