当前位置:网站首页>pycharm 终端部启用虚拟环境
pycharm 终端部启用虚拟环境
2022-07-07 14:11:00 【巴山却话】
新建项目时,选择新建虚拟环境

项目打开后,启动终端,却经常发现,并没有开启虚拟环境,导致一些包都被安装到全局环境中。
一种解决办法是手动开启虚拟环境

如果开启出错,如“禁止脚本运行”或者不识别命令等,就以管理员分身打开 powershell,然后运行如下命令
set-executionpolicy remotesigned设置为 “y” 即可
但是这时候,如果想通过命令关闭虚拟环境

发现经常没有效果,还需要手动关闭终端,再打开,才会关闭虚拟环境
各种原因没有细究(才可应该是权限问题),但是经过测试,如果将终端更换为 cmd,基本就没有上面的问题了
- 打开项目,会默认打开虚拟环境
- 打开和关闭虚拟环境的命令可以正常运行
更换方式为 “File-settings-Tool-Terminal”

此时,关闭项目中的终端,再打开,就是用 cmd 终端了

但是需要注意的是
对于已有的项目,即使修改了终端为 cmd,再次打开,开启环境可能仍然不生效
对于创建的新的项目是没有问题的
另外,项目尽量不要创建在中文目录下
边栏推荐
- How to determine whether the checkbox in JS is selected
- Mysql database backup script
- Bidding announcement: Fujian Rural Credit Union database audit system procurement project (re bidding)
- 2022第四届中国(济南)国际智慧养老产业展览会,山东老博会
- IP地址和物理地址有什么区别
- 航運船公司人工智能AI產品成熟化標准化規模應用,全球港航人工智能/集裝箱人工智能領軍者CIMC中集飛瞳,打造國際航運智能化標杆
- AE learning 01: AE complete project summary
- Three. JS introductory learning notes 15: threejs frame animation module
- hellogolang
- Shader_ Animation sequence frame
猜你喜欢

Xcode Revoke certificate

C4D learning notes 1- animation - animation key frames

Logback日志框架第三方jar包 免费获取

保证接口数据安全的10种方案

深度之眼(七)——矩阵的初等变换(附:数模一些模型的解释)

What are compiled languages and interpreted languages?
![Application example of infinite list [uigridview]](/img/11/3be1c63680e6de8f068e79690ecf12.jpg)
Application example of infinite list [uigridview]

SysOM 案例解析:消失的内存都去哪了 !| 龙蜥技术

谈谈 SAP iRPA Studio 创建的本地项目的云端部署问题

Power of leetcode-231-2
随机推荐
Is it reliable to open an account on Tongda letter with your mobile phone? Is there any potential safety hazard in such stock speculation
Logback logging framework third-party jar package is available for free
php 自带过滤和转义函数
强化实时数据管理,英方软件助力医保平台安全建设
Bidding announcement: Panjin people's Hospital Panjin hospital database maintenance project
iptables只允许指定ip地址访问指定端口
Odoo integrated plausible embedded code monitoring platform
Unity3D_ Class fishing project, bullet rebound effect is achieved
Shader basic UV operations, translation, rotation, scaling
PHP实现微信小程序人脸识别刷脸登录功能
markdown公式编辑教程
Odoo集成Plausible埋码监控平台
Unity3D_ Class fishing project, control the distance between collision walls to adapt to different models
How to determine whether the checkbox in JS is selected
The inevitable trend of the intelligent development of ankerui power grid is that microcomputer protection devices are used in power systems
A JS script can be directly put into the browser to perform operations
How to query the data of a certain day, a certain month, and a certain year in MySQL
Leetcode-136-只出现一次的数(用异或来解答)
A link opens the applet code. After compilation, it is easy to understand
Three. JS introductory learning notes 05: external model import -c4d into JSON file for web pages