Closed delicb closed 8 months ago
The woes of auto-upgrade :D Came back from lunch and greeted with broken workflow all over :)
Temporary workaround unti this is fixed is to activate the venv manually:
source <venv_dir>/bin/activate
(Linux/MacOS, bash-compatible)
See the official python documentation for other OS/shell versions and details.
Yea, rename broke bunch of things, it was a fun morning for me :). I have learned not to use rtx
(or mise
) for everything (e.g. all of my virtualenvs were broken due to broken symlinks, all of python and ruby installations were broken because python was looking for libpython
at the old location, to recreate virtualenvs I need login to CodeArtifact to configure PIP, but - you guessed it - some of needed internal tools are installed via pipx
that used rtx
installed python, and so on).
After solving all of these - I am left with broken virtualenv activation. not sure why. I am manually activating python, as you mentioned, there is no issue there, but this should work.
Btw, I see now in issue report that mise doctor
reported experimental = false
, which is not true, I have it set to true
and mise settings get experimental
confirms that, since it returns true
(and venv is being created, just not activated).
It looks like export is ran twice?
With:
export RTX_DEBUG=1
export RTX_LOG_LEVEL=trace
set -x
(set -x enables more verbose output with zsh)
First time into directory: cd /tmp/mise-venv
+-zsh:6> cd /tmp/mise-venv
+_mise_hook:1> mise hook-env -s zsh
+mise:1> local command
+mise:2> command=hook-env
+mise:3> [ 3 '=' 0 ']'
+mise:7> shift
+mise:9> case hook-env (deactivate | s | shell)
+mise:18> mise hook-env -s zsh
mise setting up virtualenv at: /tmp/mise-venv/.venv
+_mise_hook:1> eval $'export PATH=\':/home/josh/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/lib/rustup/bin\'\nexport VIRTUAL_ENV=/tmp/mise-venv/.venv\nexport PATH=\'/home/josh/.local/share/mise/installs/python/3.12/bin::/home/josh/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/lib/rustup/bin\'\nexport __MISE_DIFF=eAEBaQCW/4Ojb2xkgKNuZXeBq1ZJUlRVQUxfRU5WtC90bXAvbWlzZS12ZW52Ly52ZW52pHBhdGiR2TUvaG9tZS9qb3NoLy5sb2NhbC9zaGFyZS9taXNlL2luc3RhbGxzL3B5dGhvbi8zLjEyL2JpbriFKH4\nexport __MISE_WATCH=eAGVjjEOAUEUhm/gBDq1eXZROIDELcZk9q0ZmZm32bfZlqwz6CQqnWKVEhfQ6PVKh8BWJBS6P3/yffmqXWod8uraAUMeYU5sQGgKqZ2Bt4ygmy0K8q6qGTVLtkGjxIy0ueA6TA9BBfq8u+Pl5vRudKSVAzYqx0b7h6o1uR2h8FnDdUsMJYhXmfidtPiS1N7ez/snLEuVS6PY1Djs9ZNBjDEmURKNogegr29K'
+(eval):1> export PATH=:/home/josh/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/lib/rustup/bin
+(eval):2> export VIRTUAL_ENV=/tmp/mise-venv/.venv
+(eval):3> export PATH=/home/josh/.local/share/mise/installs/python/3.12/bin::/home/josh/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/lib/rustup/bin
+(eval):4> export __MISE_DIFF=eAEBaQCW/4Ojb2xkgKNuZXeBq1ZJUlRVQUxfRU5WtC90bXAvbWlzZS12ZW52Ly52ZW52pHBhdGiR2TUvaG9tZS9qb3NoLy5sb2NhbC9zaGFyZS9taXNlL2luc3RhbGxzL3B5dGhvbi8zLjEyL2JpbriFKH4
+(eval):5> export __MISE_WATCH=eAGVjjEOAUEUhm/gBDq1eXZROIDELcZk9q0ZmZm32bfZlqwz6CQqnWKVEhfQ6PVKh8BWJBS6P3/yffmqXWod8uraAUMeYU5sQGgKqZ2Bt4ygmy0K8q6qGTVLtkGjxIy0ueA6TA9BBfq8u+Pl5vRudKSVAzYqx0b7h6o1uR2h8FnDdUsMJYhXmfidtPiS1N7ez/snLEuVS6PY1Djs9ZNBjDEmURKNogegr29K
+_mise_hook:1> mise hook-env -s zsh
+mise:1> local command
+mise:2> command=hook-env
+mise:3> [ 3 '=' 0 ']'
+mise:7> shift
+mise:9> case hook-env (deactivate | s | shell)
+mise:18> mise hook-env -s zsh
+_mise_hook:1> eval ''
which python
/home/josh/.local/share/mise/installs/python/3.12/bin/python
cd out, back in:
+-zsh:3> cd /tmp/mise-venv
+_mise_hook:1> mise hook-env -s zsh
+mise:1> local command
+mise:2> command=hook-env
+mise:3> [ 3 '=' 0 ']'
+mise:7> shift
+mise:9> case hook-env (deactivate | s | shell)
+mise:18> mise hook-env -s zsh
+_mise_hook:1> eval $'export PATH=\':/home/josh/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/lib/rustup/bin\'\nexport VIRTUAL_ENV=/tmp/mise-venv/.venv\nexport PATH=\'/home/josh/.local/share/mise/installs/python/3.12/bin::/home/josh/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/lib/rustup/bin\'\nexport __MISE_DIFF=eAEBaQCW/4Ojb2xkgKNuZXeBq1ZJUlRVQUxfRU5WtC90bXAvbWlzZS12ZW52Ly52ZW52pHBhdGiR2TUvaG9tZS9qb3NoLy5sb2NhbC9zaGFyZS9taXNlL2luc3RhbGxzL3B5dGhvbi8zLjEyL2JpbriFKH4\nexport __MISE_WATCH=eAGVjjEOAUEUhm/gBDq1eXZROIDELcZk9q0ZmZm32bfZlqwz6CQqnWKVEhfQ6PVKh8BWJBS6P3/yffmqXWod8uraAUMeYU5sQGgKqZ2Bt4ygmy0K8q6qGTVLtkGjxIy0ueA6TA9BBfq8u+Pl5vRudKSVAzYqx0b7h6o1uR2h8FnDdUsMJYhXmfidtPiS1N7ez/snLEuVS6PY1Djs9ZNBjDEmURKNogegr29K'
+(eval):1> export PATH=:/home/josh/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/lib/rustup/bin
+(eval):2> export VIRTUAL_ENV=/tmp/mise-venv/.venv
+(eval):3> export PATH=/home/josh/.local/share/mise/installs/python/3.12/bin::/home/josh/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/lib/rustup/bin
+(eval):4> export __MISE_DIFF=eAEBaQCW/4Ojb2xkgKNuZXeBq1ZJUlRVQUxfRU5WtC90bXAvbWlzZS12ZW52Ly52ZW52pHBhdGiR2TUvaG9tZS9qb3NoLy5sb2NhbC9zaGFyZS9taXNlL2luc3RhbGxzL3B5dGhvbi8zLjEyL2JpbriFKH4
+(eval):5> export __MISE_WATCH=eAGVjjEOAUEUhm/gBDq1eXZROIDELcZk9q0ZmZm32bfZlqwz6CQqnWKVEhfQ6PVKh8BWJBS6P3/yffmqXWod8uraAUMeYU5sQGgKqZ2Bt4ygmy0K8q6qGTVLtkGjxIy0ueA6TA9BBfq8u+Pl5vRudKSVAzYqx0b7h6o1uR2h8FnDdUsMJYhXmfidtPiS1N7ez/snLEuVS6PY1Djs9ZNBjDEmURKNogegr29K
+_mise_hook:1> mise hook-env -s zsh
+mise:1> local command
+mise:2> command=hook-env
+mise:3> [ 3 '=' 0 ']'
+mise:7> shift
+mise:9> case hook-env (deactivate | s | shell)
+mise:18> mise hook-env -s zsh
+_mise_hook:1> eval ''
Huh I tested this yesterday and it worked. Will do a little digging this morning to see what's up
I just put a patch in for the mise doctor
issue
Huh I tested this yesterday and it worked. Will do a little digging this morning to see what's up
Thanks. If I can provide more info, reproduce something or help anyhow, please let me know.
the export PATH
being in there twice is just a quirk of how things work, should be fixed but not really likely to cause a problem. It looks like in @joshuataylor's output it is enabling the venv just fine?
I'm testing this myself right now.
hmm if I run mise env
I see the virtualenv:
mise main ❯ mise env
mise setting up virtualenv at: /Users/jdx/.cache/venv
set -gx VIRTUAL_ENV /Users/jdx/.cache/venv
can you try that to make sure it is outputting the env var?
I did notice I needed to delete the rtx created venv, but it sounds like you were able to get mise to create the venv
yeah I'm seeing it activate/create venvs using mise activate zsh
just fine
oh I see what you're saying, it's that PATH isn't showing the python bin, I was looking at the VIRTUAL_ENV env var. I don't think this is related to the name change but investigating.
oh it is related, I found the issue
Can confirm, all works as expected with mise-v2024-1.1
!
Thanks so much!
people in this thread: please weigh in on this poll: https://github.com/jdx/mise/discussions/1357
Describe the bug Since
rtx
->mise
rename, python virtualenvs are not activated any more. If they don't exist, they are created, but not activated.To Reproduce
Expected behavior As before, I expect that virtualenv is activated when
cd
into folder that has config file declaring virtualenv.mise doctor
outputAdditional context Add any other context about the problem here.