池の上にも

平均以下の理解力で、色々アウトプットしてみるブログ

pyenv versions の出力で気になったこと

$ pyenv virtualenv 3.6.2 hoge

を実行したら、環境が作られたのは良いのですが、

$ pyenv versions
  system
* 2.7.13 (set by /home/***/.pyenv/version)
  3.6.2
  3.6.2/envs/hoge
  hoge

hoge だけでなく3.6.2/envs/hogeも作らてしまって。

余計なものな気がして、気持ち悪かったので調べたら、hoge3.6.2/envs/hogeのsymlinkとのことでした。

There are two entries for each virtualenv, and the shorter one is just a symlink.
GitHub - pyenv/pyenv-virtualenv: a pyenv plugin to manage virtualenv (a.k.a. python-virtualenv)

確認したら、確かにsymlinkでした。

$ ls -l ${PYENV_ROOT}/versions
合計 8
drwxr-xr-x 6 *** *** 4096  8月 20 13:45 2.7.13
drwxr-xr-x 7 *** *** 4096  8月 20 13:35 3.6.2
lrwxrwxrwx 1 *** ***   42  8月 31 22:31 hoge -> /home/***/.pyenv/versions/3.6.2/envs/hoge