【问题标题】:Whenever I run '!pip list' or some command inside jupyter notebook it returns '& was unexpected at this time.'每当我在 jupyter notebook 中运行 \'!pip list\' 或某些命令时,它都会返回 \'& was unexpected at this time.\'
【发布时间】:2022-11-23 20:51:02
【问题描述】:

我正在使用 conda (miniconda3) 环境。在我的 conda 环境中,我有 Jupyter Notebook。 如果我从笔记本运行一些命令,它会返回& was unexpected at this time.

%pip list也显示相同的结果

一些信息: 操作系统:Windows 10; Python 版本:3.9.15(miniconda3)

我没有找到任何好的解决方案。 我期待执行该命令。

【问题讨论】:

    标签: python windows powershell jupyter-notebook conda


    【解决方案1】:

    请在此处查看详细答案: What is the meaning of exclamation and question marks in Jupyter notebook?

    !pip 在您的案例中所做的是:

    cmd> pip

    并且 pip 不是有效的 Windows cmd 命令。

    您正在寻找的可能是:

    %pip list

    编辑:这是我的猜测,我这里没有 Windows 电脑来测试这个

    【讨论】:

    • 也试过了..同样的结果
    猜你喜欢
    • 2021-08-21
    • 2018-09-30
    • 2021-11-21
    • 2018-08-13
    • 1970-01-01
    • 1970-01-01
    • 2018-06-20
    • 1970-01-01
    • 2019-03-18
    相关资源
    最近更新 更多