如何让 virtualenv 与鱼壳一起工作 [英] How to get virtualenv to work with fish shell
问题描述
我正在尝试让 virtualenv 与鱼壳一起工作.我已经安装了 virtualenv,它在 bash 和 zsh 上运行良好.但是,运行以下命令会返回 fish: Unknown command 'source'
:
$ source ~/path/to/bin/activate
有谁知道如何让virtualenv和fish shell一起工作.提前致谢.
使用 virtualenv 不需要激活,很方便.你可以直接使用 virtualenv:
virtualenv venv./venv/bin/pip 安装 foo
<小时>
您是否尝试过使用fish:
<预><代码>.venv/bin/activate.fish它可能不像 bash 那样被广泛使用,所以可能有问题 - 查看提交历史显示最近的修复:
https://github.com/pypa/virtualenv/blob/master/virtualenv_embedded/activate.fish
I'm trying to get virtualenv to work with the fish shell. I have virtualenv installed and it works fine with bash and zsh. However, running the following command returns fish: Unknown command 'source'
:
$ source ~/path/to/bin/activate
Does anyone know how to get virtualenv and the fish shell to work together. Thanks in advance.
You don't need to activate to use virtualenv it is a convenience. You can just use the virtualenv directly:
virtualenv venv
./venv/bin/pip install foo
Have you tried from fish using:
. venv/bin/activate.fish
It probably isn't as widely used as bash so may have issues - looking at the commit history shows a recent fix:
https://github.com/pypa/virtualenv/blob/master/virtualenv_embedded/activate.fish
这篇关于如何让 virtualenv 与鱼壳一起工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!