pyenv activate <venv> does not work properly
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 35/100
調査の方向性
Start by reproducing the reported pyenv activate test380, python -V, pyenv which python, and exec "$SHELL" sequence in a fresh shell. Inspect how shell initialization and activation affect command selection; done means the activated environment consistently reports Python 3.8.0 without requiring a shell reset.
索引モデルが issue の本文から書いたものです。
説明
I have just noticed recently, that the above mentioned command does not switch to a virtual environment as before.
Here how it looks like atm:
(base) art@HP:~$ python --version
Python 3.7.4
(base) art@HP:~$ python -V
Python 3.7.4
(base) art@HP:~$ pyenv versions
* system (set by /home/art/.python-version)
3.7.5
3.8.0
3.8.0/envs/cuda380
cuda380
(base) art@HP:~$ pyenv virtualenv 3.8.0 test380
Looking in links: /tmp/tmp49kcmsng
Requirement already satisfied: setuptools in /home/art/.pyenv/versions/3.8.0/envs/test380/lib/python3.8/site-packages (41.2.0)
Requirement already satisfied: pip in /home/art/.pyenv/versions/3.8.0/envs/test380/lib/python3.8/site-packages (19.2.3)
(base) art@HP:~$ pyenv activate test380
pyenv-virtualenv: prompt changing will be removed from future release. configure `export PYENV_VIRTUALENV_DISABLE_PROMPT=1' to simulate the behavior.
(test380) (base) art@HP:~$ python --version
Python 3.7.4
(test380) (base) art@HP:~$ python -V
Python 3.7.4
(test380) (base) art@HP:~$
From the code above you can see that I created virtual environment called "test380" which is based on 3.8.0 version of python. But when I activate it and check the version it says 3.7.4 - i.e. global version. Same if I will try pip list for example - it will show me the packages of the global python, not the virtual active one. Interesting thing is that if I go to pycharm and add the test380 venv as an interpreter, it will be 3.8.0. I am a bit confused, whats wrong in here, any idea?
I have tried deleting the .pyenv folder and installing it again with
$ curl https://pyenv.run | bash
Now I get some additional messages when I try to display the python version, but the version it shows me is still the global one:
(base) art@HP:~$ pyenv versions
* system (set by /home/art/.python-version)
3.8.0
3.8.0/envs/test380
test380
(base) art@HP:~$ pyenv activate test380
pyenv-virtualenv: prompt changing will be removed from future release. configure `export PYENV_VIRTUALENV_DISABLE_PROMPT=1' to simulate the behavior.
(test380) (base) art@HP:~$ python -V
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Python 3.7.4
After shell reset with '$ exec "$SHELL"" it finally shows the correct venv version, but it works only once, if I reopen the terminal, the problem with wrong version remains until I execute shell reset again. Moreover after shell reset it is not shown which venv is active in the brackets, it only shows (base).
(base) art@HP:~$ pyenv activate test380
pyenv-virtualenv: prompt changing will be removed from future release. configure `export PYENV_VIRTUALENV_DISABLE_PROMPT=1' to simulate the behavior.
(test380) (base) art@HP:~$ python -V
Python 3.7.4
(test380) (base) art@HP:~$ exec "$SHELL"
(base) art@HP:~$ python -V
Python 3.8.0
(base) art@HP:~$ pyenv which python
/home/art/.pyenv/versions/test380/bin/python
(base) art@HP:~$
- 主要言語
- Shell
- スター
- 6.7k
- フォーク
- 433
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 11
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
pyenv/pyenv-virtualenv のほかの issue
-
Document the virtualenv, activate and deactivate hooks対応中かも @officialasishkumar が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
pyenv/pyenv-virtualenv#552 ·
メンテナーはふだん 1 日以内に返信
-
Creating a virtualenv from system leaves a self-referencing symlink inside it対応中かも @dhananjay6561 が 4 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
pyenv/pyenv-virtualenv#548 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
virtualenv-delete with a trailing slash can remove all of $PYENV_ROOT/versions対応中かも @dhananjay6561 が 4 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
pyenv/pyenv-virtualenv#546 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Fish: activating a conda env doesn't set CONDA_PREFIX or run its activate.d/deactivate.d scripts対応中かも @officialasishkumar が今日担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 76/100
pyenv/pyenv-virtualenv#550 ·
メンテナーはふだん 1 日以内に返信
-
`pyenv virtualenv (version) (name)` ignores specified version and uses homebrew's `python` versionオープン
難易度 3/5 半日 初心者へのやさしさ 55/100
pyenv/pyenv-virtualenv#531 ·
メンテナーはふだん 1 日以内に返信
pyenv/pyenv-virtualenv の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
Abdk4Moura/tunlion#1014 ·
メンテナーはふだん 1 日以内に返信
-
icon request
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
PapirusDevelopmentTeam/papirus-icon-theme#4401 ·
メンテナーはふだん 3 日以内に返信
-
package-update
難易度 1/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信