Pycharm创建python虚拟环境

Pycharm创建python虚拟环境

  1. 打开File -> Settings
    在这里插入图片描述

  2. 找到Project Interpreter
    在这里插入图片描述

  3. 选择右边的齿轮图标,点击Add
    在这里插入图片描述

  4. 如下图所示,选择放虚拟环境包的文件夹,点击OK
    在这里插入图片描述

小拓展

  1. 利用requirements.txt安装python的包的命令:

    pip install - r requirements.txt

  2. 生成requirements.txt命令:

    pip freeze > requirements.txt

  3. 命令行切换虚拟环境【注意使用 git-bash.exe 即shell命令行】

    source venv/Scripts/activate

  4. 命令行工具【建议使用 git-bash.exe】

猜你喜欢

转载自blog.csdn.net/cai454692590/article/details/90268536
今日推荐