当前位置:网站首页>pycharm 终端部启用虚拟环境
pycharm 终端部启用虚拟环境
2022-07-07 14:11:00 【巴山却话】
新建项目时,选择新建虚拟环境
项目打开后,启动终端,却经常发现,并没有开启虚拟环境,导致一些包都被安装到全局环境中。
一种解决办法是手动开启虚拟环境
如果开启出错,如“禁止脚本运行”或者不识别命令等,就以管理员分身打开 powershell,然后运行如下命令
set-executionpolicy remotesigned
设置为 “y” 即可
但是这时候,如果想通过命令关闭虚拟环境
发现经常没有效果,还需要手动关闭终端,再打开,才会关闭虚拟环境
各种原因没有细究(才可应该是权限问题),但是经过测试,如果将终端更换为 cmd,基本就没有上面的问题了
- 打开项目,会默认打开虚拟环境
- 打开和关闭虚拟环境的命令可以正常运行
更换方式为 “File-settings-Tool-Terminal”
此时,关闭项目中的终端,再打开,就是用 cmd 终端了
但是需要注意的是
对于已有的项目,即使修改了终端为 cmd,再次打开,开启环境可能仍然不生效
对于创建的新的项目是没有问题的
另外,项目尽量不要创建在中文目录下
边栏推荐
- 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
- 47_Opencv中的轮廓查找 cv::findContours()
- Numpy -- epidemic data analysis case
- Iptables only allows the specified IP address to access the specified port
- SPI master RX time out interrupt
- Apache Doris just "graduated": why should we pay attention to this kind of SQL data warehouse?
- Migration and reprint
- 分步式监控平台zabbix
- What are compiled languages and interpreted languages?
- Laravel 服务提供者实例教程 —— 创建 Service Provider 测试实例
猜你喜欢
统计学习方法——感知机
星瑞格数据库入围“2021年度福建省信息技术应用创新典型解决方案”
无线传感器网络--ZigBee和6LoWPAN
torch.numel作用
C4D learning notes 2- animation - timeline and time function
Three. JS introductory learning notes 19: how to import FBX static model
Lecturer solicitation order | Apache seatunnel (cultivating) meetup sharing guests are in hot Recruitment!
Numpy --- basic learning notes
Numpy -- epidemic data analysis case
Xingruige database was shortlisted as the "typical solution for information technology application and innovation in Fujian Province in 2021"
随机推荐
You Yuxi, coming!
Numpy -- epidemic data analysis case
asyncio 概念和用法
Shandong old age Expo, 2022 China smart elderly care exhibition, smart elderly care and aging technology exhibition
laravel post提交数据时显示异常
Performance measure of classification model
Xcode Revoke certificate
深度之眼(七)——矩阵的初等变换(附:数模一些模型的解释)
保证接口数据安全的10种方案
Shipping companies' AI products are mature, standardized and applied on a large scale. CIMC, the global leader in port and shipping AI / container AI, has built a benchmark for international shipping
Talk about the cloud deployment of local projects created by SAP IRPA studio
U3D_ Infinite Bessel curve
Numpy --- basic learning notes
Bidding announcement: Fujian Rural Credit Union database audit system procurement project (re bidding)
Logback logging framework third-party jar package is available for free
There are many ways to realize the pause function in JS
How does geojson data merge the boundaries of regions?
如何在shell中实现 backspace
PHP实现微信小程序人脸识别刷脸登录功能
分步式監控平臺zabbix