简体   繁体   English

flask 在错误的 conda 环境下运行

[英]flask running with wrong conda environment

I have a conda environment on which I installed flask and other libraries.我有一个 conda 环境,我在上面安装了 flask 和其他库。 However, whenever I use flask run , I get import errors.但是,每当我使用flask run时,都会出现导入错误。 I checked the python used to interpret my code and it is not the same python of my conda environment.我检查了用于解释我的代码的 python,它与我的 conda 环境的 python 不同。 I'm using VS Code and I did select the correct interpreter in VS Code.我正在使用 VS Code,我在 VS Code 中做了正确的解释器 select。

I am forced to pip install all my libraries on my local environment which is really not useful.我被迫 pip 在我的本地环境中安装我所有的库,这真的没用。 Is there a way to choose the python used when we call flask run ?有没有办法选择我们调用flask run时使用的 python ?

Thanks a lot非常感谢

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM