【问题标题】:I can't run the script and make a virtual environment我无法运行脚本并创建虚拟环境
【发布时间】:2022-01-26 17:10:24
【问题描述】:

我正在尝试安装虚拟环境以使用库,但它绝对不起作用

python:名称“python”未被识别为 cmdlet、函数、脚本文件或可执行程序的名称。检查名称的拼写,以及路径的存在和正确性,然后重试。 行:1 标志:1

  • python -m venv 废品
  •   + CategoryInfo          : ObjectNotFound: (python:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
    

【问题讨论】:

    标签: python python-3.x python-venv


    【解决方案1】:

    在 Windows 上,您需要将 Python 添加到 PATH。试试这个How to add Python to PATH

    并检查Python是否安装正确并重启你的电脑on this Question restarting the PC helped

    【讨论】:

      【解决方案2】:

      您需要将路径添加到您的环境变量中。

      你应该去Control Panel>SystemSecurity>System>Advanced System Settings>Environment Variables

      然后选择edit PATH 并将路径附加到您的python 可执行文件:

      C:\Users\{your_user}\AppData\Local\Programs\Python\{your_python_executable}
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2020-11-19
        • 2021-03-04
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多