可以激活虚拟环境 - 在我的计算机上安装conda时,用内置的Python模块VENV创建
我使用此命令创建了一个python虚拟环境:
$ python -m venv panda
它已成功创建,但是当我尝试使用以下错误激活环境时:
$ activate panda/Scripts/activate.bat
它给我以下错误:
Not a conda environment: F:\panda\Scripts\activate.bat
我使用:
- conda 4.10.3
- python 3.9.7
- git bash 2.35.1 .Windows.2
I created a python virtual environment using this command:
$ python -m venv panda
It has been created successfully but when I try to activate the environment using:
$ activate panda/Scripts/activate.bat
It gives me the following error:
Not a conda environment: F:\panda\Scripts\activate.bat
I'm using:
- conda 4.10.3
- Python 3.9.7
- Git Bash 2.35.1.windows.2
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可能想查看这个问题:如何来源Virtualenv在bash脚本中激活。它可能有助于激活bash中的环境。
。 ./panda/scripts/activate
应激活您的环境;但是,它是一个虚拟环境,而不是conda环境。如果您想使用Conda虚拟环境,则此页面可能会有所帮助: https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html
You may want to take a look at this question: How to source virtualenv activate in a Bash script. It may help with activating environments in bash.
. ./panda/scripts/activate
should activate your environment; however, it with be a Python virtual environment and not a Conda environment.If you are trying to use a Conda virtual environment, this page may help: https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html