Win10用vscode打开anaconda环境中的python出错问题的解决
作者:一只用R的浣熊 时间:2023-04-21 09:21:21
环境变量配置
首先需要将anaconda的路径配置进环境变量中,我是用户变量和系统变量都配置了。我的anaconda安装在D:\Anaconda
,于是环境变量加入:D:\Anaconda
D:\Anaconda\Scripts
D:\Anaconda\Library\bin
这三个。
不支持powershell
环境变量配置完成后,vscode运行hello.py文件报了下面的错误:
Warning:
This Python interpreter is in a conda environment, but the environment has
not been activated. Libraries may fail to load. To activate this environment
please see https://conda.io/activation
有点烦…
打开powershell,输入conda activate
,没有反映…
但是打开cmd,输入conda activate
则顺利激活了base环境,此时就可以使用环境中的python了!!!
所以vscode中,在terminal输入cmd,手动激活环境再打开python即可。。或者直接切换默认terminal为cmd,这样每次运行python文件都不会出现问题了。
来源:https://blog.csdn.net/weixin_44597588/article/details/106305501
标签:vscode,anaconda,python,出错
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
python sys模块使用方法介绍
2021-02-03 09:19:16
![](https://img.aspxhome.com/file/2023/5/112435_0s.png)
基于JS+Canvas的lucky-canvas 抽奖功能
2024-04-19 09:51:26
![](https://img.aspxhome.com/file/2023/5/136075_0s.webp)
对numpy中向量式三目运算符详解
2023-06-28 02:14:55
详解JavaScript中的作用域链与闭包
2024-04-22 13:07:00
![](https://img.aspxhome.com/file/2023/6/135796_0s.jpg)
Mootools 1.2教程(9)——输入过滤第二部分(字符串)
2008-12-01 12:25:00
elementUI el-table二次封装的详细实例
2024-05-03 15:12:00
![](https://img.aspxhome.com/file/2023/0/130190_0s.png)
Python实现嵌套列表及字典并按某一元素去重复功能示例
2023-02-22 10:44:05
![](https://img.aspxhome.com/file/2023/5/95245_0s.png)
教你利用Selenium+python自动化来解决pip使用异常
2022-11-17 18:49:08
![](https://img.aspxhome.com/file/2023/0/110200_0s.png)
SQLServer 全文检索(full-text)语法
2011-12-01 10:38:22
C语言中操作sqlserver数据库案例教程
2024-01-24 17:47:32
![](https://img.aspxhome.com/file/2023/9/127989_0s.jpg)
Java正则表达式之Pattern类实例详解
2023-11-07 10:13:33
asp.net TreeView与XML三步生成列表树
2024-06-05 09:32:31
![](https://img.aspxhome.com/file/2023/2/122782_0s.jpg)
返回SQL执行时间的存储过程
2024-01-16 15:22:06
Pytorch之parameters的使用
2022-05-22 21:06:01
selenium自动化测试简单准备
2023-02-07 13:04:12
![](https://img.aspxhome.com/file/2023/4/75904_0s.png)
pandas读取csv文件,分隔符参数sep的实例
2021-05-03 11:38:58
Linux(Redhat)安装python3.6虚拟环境(推荐)
2022-06-08 23:34:13
python imutils包基本概念及使用
2023-10-20 21:38:09
![](https://img.aspxhome.com/file/2023/6/131256_0s.png)
Go Plugins插件的实现方式
2023-10-15 01:51:20
Centos6.5在线安装mysql 8.0详细教程
2024-01-15 01:02:57