简体   繁体   English

无法激活任何虚拟环境

[英]Can't activate any virtual env

When I trying to activate virtual environment using venv, pipenv and conda I always getting this error:当我尝试使用 venv、pipenv 和 conda 激活虚拟环境时,我总是收到此错误:

 venv/bin/activate:41: parse error near `deactivate'

There's content of activate file: Activate激活文件有内容: Activate

I had exacly same issue.我有完全相同的问题。 It was conflicting alias in my case.在我的情况下,这是冲突的别名。 I had alias fi="flatpak install --user" in my ~/.zshrc.我的 ~/.zshrc 中有alias fi="flatpak install --user" When I commented that, command worked like this:当我评论时,命令是这样工作的:

$ fi
zsh: parse error near `fi'

and source venv/bin/activate worked correctly并且source venv/bin/activate工作正常

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

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