【问题标题】:Can't Create Virtualenv in Python3无法在 Python3 中创建 Virtualenv
【发布时间】:2018-11-06 23:51:58
【问题描述】:

所以我正在尝试创建一个使用谷歌 API 的文本识别的应用程序,我在 python3 中还可以,但在编程方面仍然是初学者,所以我不知道发生了什么。我只是按照所有步骤操作,甚至创建了一个系统变量来将脚本文件夹放在我的 PATH 或其他任何地方。我的问题是当我试图按照提供的图片These are the instructions that the Google documentation is giving. 中的步骤进行操作时,我在命令提示符Here are the errors I'm seeing in the command prompt when I input the stuff that the Google Documentation said to put. 的第二张图片中遇到了问题。我真的需要帮助来完成这项工作,还请告诉我我在做什么。

【问题讨论】:

标签: python python-3.x google-api virtualenv command-prompt


【解决方案1】:

而不是使用 virtualenv venv

试试

py -3 -m venv venv

创建虚拟环境

http://flask.pocoo.org/docs/1.0/installation/

【讨论】:

    【解决方案2】:

    virtualenv 可能尚未安装。您可以使用pip3 install virtualenv 执行此操作。从 3.4 版本开始,pip3 与 Python 捆绑在一起,但如果您没有,请参阅https://pip.pypa.io/en/stable/installing/

    如果您确定确实安装了virtualenv,则它可能不在系统路径上。使用set PATH=%PATH%;C:\your\path\here 并将C:\your\path\here\ 替换为virtualenv.exe 的位置。

    【讨论】:

    • 不,它已安装
    • 你的系统路径中有virtualenv.py吗?
    • 我在 PATH 中有脚本目录,并且该文件夹有 virtualenv.exe
    • 尝试使用管理员权限从 cmd 重新安装 virtualenv
    • 使用pip install --upgrade --force-reinstall virtualenv
    【解决方案3】:

    py -3 -m venv venv 在我的 Windows 上为我工作,之后我还做了其他建议,如重新安装 virtualenv 和设置路径。现在,我可以在我的工作目录中看到 venv 文件夹了。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-12-04
      • 1970-01-01
      • 2017-11-11
      • 2017-03-09
      • 1970-01-01
      • 1970-01-01
      • 2020-08-10
      相关资源
      最近更新 更多