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

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

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

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

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

但是需要注意的是
对于已有的项目,即使修改了终端为 cmd,再次打开,开启环境可能仍然不生效
对于创建的新的项目是没有问题的
另外,项目尽量不要创建在中文目录下
边栏推荐
- Shandong old age Expo, 2022 China smart elderly care exhibition, smart elderly care and aging technology exhibition
- Introduction to pyGame games
- How to implement backspace in shell
- 持续创作,还得靠它!
- Plate - forme de surveillance par étapes zabbix
- Communication mode between application program and MATLAB
- Performance comparison of tidb for PostgreSQL and yugabytedb on sysbench
- 【知识小结】PHP使用svn笔记总结
- TS typescript type declaration special declaration field number is handled when the key key
- 航天宏图信息中标乌鲁木齐某单位数据库系统研发项目
猜你喜欢

SPI master rx time out中断

Three. JS introductory learning notes 08:orbitcontrols JS plug-in - mouse control model rotation, zoom in, zoom out, translation, etc

L'application à l'échelle de la normalisation mature des produits ai des compagnies maritimes, cimc, leader mondial de l'intelligence artificielle portuaire et maritime / intelligence artificielle des

Eye of depth (VI) -- inverse of matrix (attachment: some ideas of logistic model)

统计学习方法——感知机

You Yuxi, coming!

讲师征集令 | Apache SeaTunnel(Incubating) Meetup 分享嘉宾火热招募中!

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

Apache Doris刚“毕业”:为什么应关注这种SQL数据仓库?

Three. JS introductory learning notes 04: external model import - no material obj model
随机推荐
Three. JS introductory learning notes 13: animation learning
强化实时数据管理,英方软件助力医保平台安全建设
山东老博会,2022中国智慧养老展会,智能化养老、适老科技展
Sysom case analysis: where is the missing memory| Dragon lizard Technology
AE learning 02: timeline
How to query the data of a certain day, a certain month, and a certain year in MySQL
95.(cesium篇)cesium动态单体化-3D建筑物(楼栋)
Iptables only allows the specified IP address to access the specified port
Plate - forme de surveillance par étapes zabbix
U3D_ Infinite Bessel curve
Multiplication in pytorch: mul (), multiply (), matmul (), mm (), MV (), dot ()
MySQL中, 如何查询某一天, 某一月, 某一年的数据
You Yuxi, coming!
Eye of depth (VII) -- Elementary Transformation of matrix (attachment: explanation of some mathematical models)
Function: JS Click to copy content function
Description of vs common shortcut keys
Apache Doris刚“毕业”:为什么应关注这种SQL数据仓库?
PyTorch 中的乘法:mul()、multiply()、matmul()、mm()、mv()、dot()
ThinkPHP URL 路由简介
Three. Introduction to JS learning notes 17: mouse control of 3D model rotation of JSON file