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

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

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

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

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

但是需要注意的是
对于已有的项目,即使修改了终端为 cmd,再次打开,开启环境可能仍然不生效
对于创建的新的项目是没有问题的
另外,项目尽量不要创建在中文目录下
边栏推荐
- 保证接口数据安全的10种方案
- Three. JS introductory learning notes 10:three JS grid
- PHP实现微信小程序人脸识别刷脸登录功能
- 2022 the 4th China (Jinan) International Smart elderly care industry exhibition, Shandong old age Expo
- Apache Doris刚“毕业”:为什么应关注这种SQL数据仓库?
- Logback日志框架第三方jar包 免费获取
- Laravel5.1 路由 -路由分组
- Apache Doris just "graduated": why should we pay attention to this kind of SQL data warehouse?
- Simple understanding and application of TS generics
- Iptables only allows the specified IP address to access the specified port
猜你喜欢

95.(cesium篇)cesium动态单体化-3D建筑物(楼栋)

融云斩获 2022 中国信创数字化办公门户卓越产品奖!

MySQL数据库基本操作-DQL-基本查询

Three. JS introductory learning notes 11:three JS group composite object

TS as a general cache method

Odoo integrated plausible embedded code monitoring platform

torch. Numel action

Odoo集成Plausible埋码监控平台

Sysom case analysis: where is the missing memory| Dragon lizard Technology

Three. JS introductory learning notes 19: how to import FBX static model
随机推荐
过度依赖补助,大客户收款难,冲刺“国产数据库第一股”的达梦后劲有多足?
laravel中将session由文件保存改为数据库保存
Unity3D_ Class fishing project, control the distance between collision walls to adapt to different models
ThinkPHP URL 路由简介
PyTorch 中的乘法:mul()、multiply()、matmul()、mm()、mv()、dot()
Performance measure of classification model
Power of leetcode-231-2
SPI master RX time out interrupt
Lecturer solicitation order | Apache seatunnel (cultivating) meetup sharing guests are in hot Recruitment!
Description of vs common shortcut keys
Three. JS introductory learning notes 04: external model import - no material obj model
Rongyun won the 2022 China Xinchuang digital office portal excellence product award!
Particle effect for ugui
PHP中exit,exit(0),exit(1),exit(‘0’),exit(‘1’),die,return的区别
What else can an ordinary person do besides working in a factory to make money?
Bidding announcement: Fujian Rural Credit Union database audit system procurement project (re bidding)
Three. Introduction to JS learning notes 17: mouse control of 3D model rotation of JSON file
There are many ways to realize the pause function in JS
航运船公司人工智能AI产品成熟化标准化规模应用,全球港航人工智能/集装箱人工智能领军者CIMC中集飞瞳,打造国际航运智能化标杆
Markdown formula editing tutorial