24
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

fish で venv を activate する

Last updated at Posted at 2018-09-01

おそらく当たり前過ぎてどこにも乗っていなかっただけだと思うけれど、自分が詰まったのでメモ

経緯

pycharm のプロジェクトの中にある venv をアクティベートしたかったのでググって出てきた以下のコマンド使ったらエラー出た(脳死)

$ source venv/bin/activate
venv/bin/activate (line 23): Unsupported use of '||'. In fish, please use 'COMMAND; or COMMAND'.
    if [ -n "${BASH-}" ] || [ -n "${ZSH_VERSION-}" ] ; then
                          ^
from sourcing file venv/bin/activate
	called on standard input

source: Error while reading file 'venv/bin/activate'

そもそも fish 使ってるじゃん

fish用の activate が用意されてました。 (ここに書いてあった)

$ source venv/bin/activate.fish

自分から fish 使ってるんだからもう少し知識を深めなければいけないなと思いました。

24
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
24
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?